$IncludeConfig diag-common.conf
template(name="outfmt" type="string" string="h:%$!hr% m:%$!min% s:%$!sec%\n")

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

template(name="time_fragment" type="list") {
  property(name="msg" regex.Expression="[0-9]{2}:[0-9]{2}:[0-9]{2} [A-Z]+" regex.Type="ERE" regex.Match="0")
}

set $.time_frag = exec_template("time_fragment");

action(type="mmnormalize" rulebase="testsuites/mmnormalize_variable.rulebase" variable="$.time_frag")
action(type="omfile" file="./rsyslog.out.log" template="outfmt")
