I want to change the log message format which is getting printed in /var/log/messages.
I checked in rsyslog.conf file also ,but i didnt find anything relevant to this. Please help.
I want to change the log message format which is getting printed in /var/log/messages.
I checked in rsyslog.conf file also ,but i didnt find anything relevant to this. Please help.
I think templates are what you're after: http://www.rsyslog.com/doc/v8-stable/configuration/templates.html
Note that these docs apply to version 8. If you don't have it, you might want to get it from rsyslog.com, for example via packages: http://www.rsyslog.com/downloads/download-other/
With your template defined, you can use it to write to files, like
action(
type="omfile"
file="/var/log/messages"
template="your-template"
)
More details about action directives can be found here: http://www.rsyslog.com/doc/v8-stable/configuration/actions.html
And about the file output in particular: http://www.rsyslog.com/doc/v8-stable/configuration/modules/omfile.html