syslog - Can we change the log message format in sysklogd (similar to creating templates in rsyslog) -
i have send data rsyslog in format eg:
fac:kern hello pri:info hello may 5 14:06:31 nitish-virtualbox kernel: kernel logging (proc) stopped. so created new conf file called "my.conf" in /etc/rsyslog.d/ , added following lines in it
$template myformat,"fac:%syslogfacility-text% hello pri:%syslogpriority-text% hello %timegenerated% %msg%\n" *.* /home/user/log.txt;myformat so can strip log message in java application facility name,priority name , rest of message.here string "hello" acts filter element.
i can create templates in rsyslog , send incoming syslog messages in format log.txt. have send log messages sysklogd(not syslog-ng , not rsyslog) in same format sysklogd not support templates.so there way change log message format in sysklogd
in word, no. best bet out of sysklogd , on daemon capable of manipulating template (even if it's relaying second syslogd on same system).
Comments
Post a Comment