$EscapeControlCharactersOnReceive off #关闭rsyslog默认转译ASCII<32的所有怪异字符,包括换行符等 $template tocFormat,"%msg% " #$template tocFormat,"%syslogtag%,%msg% " $template zjzc-flow01,"/data01/applog_backup/zjzc_log/zj-flow01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template zjzc-flow02,"/data01/applog_backup/zjzc_log/zj-flow02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template zjzc-api01,"/data01/applog_backup/zjzc_log/zj-api01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template zjzc-api02,"/data01/applog_backup/zjzc_log/zj-api02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template zjzc-pay01,"/data01/applog_backup/zjzc_log/zj-pay01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template zjzc-pay02,"/data01/applog_backup/zjzc_log/zj-pay02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 ########################温金 $template wj-flow01,"/data01/applog_backup/winfae_log/wj-flow01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-flow02,"/data01/applog_backup/winfae_log/wj-flow02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-api01,"/data01/applog_backup/winfae_log/wj-api01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-api02,"/data01/applog_backup/winfae_log/wj-api02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-pay01,"/data01/applog_backup/winfae_log/wj-pay01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-pay02,"/data01/applog_backup/winfae_log/wj-pay02-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 $template wj-proxy01,"/data01/applog_backup/winfae_log/wj-proxy01-catalina.out.%$year%-%$month%-%$day%" #定义TC:日志存放路径 :syslogtag,isequal,"wj-flow01" -?wj-flow01;tocFormat :syslogtag,isequal,"wj-flow02" -?wj-flow02;tocFormat :syslogtag,isequal,"wj-api01" -?wj-api01;tocFormat :syslogtag,isequal,"wj-api02" -?wj-api02;tocFormat :syslogtag,isequal,"wj-pay01" -?wj-pay01;tocFormat :syslogtag,isequal,"wj-pay02" -?wj-pay02;tocFormat :syslogtag,isequal,"wj-proxy01" -?wj-proxy01;tocFormat ######################中均 :syslogtag,isequal,"zjzc-flow01" -?zjzc-flow01;tocFormat :syslogtag,isequal,"zjzc-flow02" -?zjzc-flow02;tocFormat :syslogtag,isequal,"zjzc-api01" -?zjzc-api01;tocFormat :syslogtag,isequal,"zjzc-api02" -?zjzc-api02;tocFormat :syslogtag,isequal,"zjzc-pay01" -?zjzc-pay01;tocFormat :syslogtag,isequal,"zjzc-pay02" -?zjzc-pay02;tocFormat #if $syslogfacility-text == 'local5' and $msg startswith 'zjzc-flow01' then -?zjzc-flow01;tocFormat rsyslog 这里不需要配置 #$template tocFormat,"%syslogtag%,%msg% " 就可以按照 :syslogtag,isequal,"zjzc-flow01" 进行匹配