$IncludeConfig diag-common.conf
template(name="outfmt" type="string" string="%$.replaced_msg%\n")

module(load="../plugins/imptcp/.libs/imptcp")
input(type="imptcp" port="13514")

template(name="date_time" type="list") {
  property(name="msg" regex.Expression="Thu .+ 2014" regex.Type="ERE" regex.Match="0")
}

set $.replaced_msg = replace("date time: " & exec_template("date_time"), "O" & "ct", replace("october", "o", "0"));

action(type="omfile" file="./rsyslog.out.log" template="outfmt")
