-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-09-02 17:37, Per Jessen wrote:
Anton Aylward wrote:
What makes you think syslog-ng is more complex, Anton? I distinctly remember a few years back when openSUSE switched to rsyslog. I tried to get rsyslog to write timestamps in the ISO8601 format.
$template My_SyslogProtocol23Format,"<%SYSLOGFACILITY%.%SYSLOGPRIORITY%> %TIMESTAMP:::date-pgsql% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\n" $ActionFileDefaultTemplate My_SyslogProtocol23Format which produces: <2.7> 2016-09-03 02:40:48 minas-tirith dovecot - - - imap(cer): Debug: Effective uid=1000, gid=100, home=/home/cer
In syslog-ng it was just add "ts_format(iso)" to the main options, I don't remember if I ever worked it out in rsyslog :-)
You can not define a custom time format in rsyslog. It's recommended format is this one, IIRC: <46>1 2015-01-09T17:43:48.505330+01:00 minas-tirith rsyslogd - - - [origin software="rsyslogd" swVersion="7.4.7" x-pid="21971" x-info="http://www.rsyslog.com"] exiting on signal 15. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlfKHT4ACgkQja8UbcUWM1zGGwD/aOfE7V6GatWkD1+RcJA8XhK3 6KNE5j9X9YmcN4nW0yAA/3Wwh0CjOZTqeTG0selq/a0+unreRRkueh2y2zu9C2Mm =tw+E -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org