[syslog-ng] Milliseconds in timestamp and black magic
Sergei Zhirikov
sfzhi at yahoo.com
Fri Aug 21 21:19:30 CEST 2009
Hi,
I'm observing something mysterious with milliseconds in timestamps.
I set frac_digits() in the global options and then I have a rewriter and
a template. Something like this:
options { frac_digits(3); };
source s { internal(); }
rewrite r { set("$ISODATE", value("MYDATE")); };
template t { template("$ISODATE ($MYDATE) $HOST $MSGHDR$MESSAGE\n"); };
destination d { file("/var/log/test.log" template(t)); };
log { source(s); rewrite(r); destination(d); };
To my total surprise the expanded value of $ISODATE in the log file
contains fraction part, but the value of $MYDATE does not! Aren't they
supposed to be the same because of the rewrite rule? Or am I doing
something wrong? (I'm using syslog-ng 3.0.4 on Linux).
--
Thanks,
Sergei.
More information about the syslog-ng
mailing list