``` $ModLoad imudp $UDPServerRun 514 template(name="cmpDate" type="list") { property(name="timereported" dateformat="year") constant(value="-") property(name="timereported" dateformat="month") constant(value="-") property(name="timereported" dateformat="day") } set $.cmpDate = exec_template("cmpDate"); set $.cmpSuff = "default"; template(name="cmpOutFile" type="list") { constant(value="/mnt/netlog/zzz/") property(name="$.cmpDate") constant(value="/") # property(name="hostname") property(name="fromhost-ip") constant(value="-") property(name="$.cmpSuff") constant(value=".log") } template(name="cmpOutFmt" type="list") { property(name="$.cmpDate") constant(value=" ") property(name="timereported" dateformat="hour") constant(value=":") property(name="timereported" dateformat="minute") constant(value=":") property(name="timereported" dateformat="second") constant(value=" ") property(name="hostname") constant(value=" ") property(name="syslogtag") property(name="msg" spifno1stsp="on" ) property(name="msg" droplastlf="on" ) constant(value="\n") } if( $fromhost-ip == "127.0.0.1" ) then { stop } if ( $fromhost-ip == "172.16.1.1" ) then { if ( $syslogtag contains "teg3" ) then { set $.cmpSuff = "teg3"; } } action(type="omfile" dynafile="cmpOutFile" template="cmpOutFmt") stop ```