Linux – Is there some way (in Linux) to set how syslog writes its timestamp

centoslinuxsyslog

My syslog configuration (the default CentOS 5.3 configuration) writes out time stamps that look like

Jan  1 00:00:00 message

I would like the timestamp to contain the year. Preferably it would look like

2010-01-01 00:00:00.000000 message

Is there any way to configure syslog to do this?

Best Answer

CentOS 5.4 uses sysklogd by default, syslog-ng is not provided*.There is no mention of how to alter the date format in the syslog.conf manpage. rsyslog is available through the default repositories and, glancing at its manpage, it may do what you want.

*See Where can I find syslog-ng in Red Hat Enterprise Linux 5?