-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2009-03-25 at 13:02 +0100, Per Jessen wrote:
How can i get the year included in the timestamps of log files ?
Just write the right template in /etc/syslog-ng/syslog-ng:
template("$ISODATE $HOST $MSG\n")
I would like it to look something like this: Mar 25 2009 10:40:26 SoliD syslog-ng[1801]: STATS: dropped 0
Look up the manual for syslog-ng, I'm sure there's a way to add the year like that.
Interesting! I see some samples. /packages/syslog-ng/syslog-ng.txt: destination d_file { file("/var/log/$YEAR.$MONTH.$DAY/messages" template("$HOUR:$MIN:$SEC $TZ $HOST [$LEVEL] $MSG $MSG\n") template_escape(no) ); }; I'll have to play with that. I'd like to setup the default for all logs to something like "20090325 13:39:47" (or 09 instead of 2009, dunno). The above sintaxis seems to be for one file only. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknKJoUACgkQtTMYHG2NR9UFvwCeNJydCE7juQjocQjf5eJV8sr1 OhoAnRnZZW3TOcan0nzqXwbSZ5Jgbctq =gx/z -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org