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

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

set $.replaced_msg = replace($msg, "syslog", "rsyslog");
set $.replaced_msg = replace($.replaced_msg, "hello", "hello_world");
set $.replaced_msg = replace($.replaced_msg, "foo_bar_baz", "FBB");

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