<div>Okay, I have this in my syslog-ng.conf:<br>
<br>
options { dir_perm(0755); perm(0644); chain_hostnames(no); ts_format("iso");<br>
keep_hostname(yes); };<br>
...<br>
<br>
#
local0.debug
/var/log/ngr/ngr_3456_A.log<br>
<br>
filter f_12 {<br>
facility(local0) and level(debug..emerg);<br>
};<br>
<br>
destination d_8 {<br>
file("/var/log/ngr/ngr_3456_A_$MONTH$DAY$YEAR.log"<br>
template("$R_ISODATE $HOST $MSG\n")<br>
template_escape(no)<br>
create_dirs(yes)<br>
);<br>
};<br>
<br>
log { source(local); filter(f_12); destination(d_8); };<br>
<br>
And this is an entry from the corresponding log:<br>
<br>
2006-02-10T07:45:15-05:00 localhost <rest of message><br>
<br>
If the timestamp in this case is using the received timestamp, how is
this being transmitted/delivered? Is it being done in ASCII and,
if so, is it possible that the fractional portions are not being
included? <br>
<br>
Thanks.<br>
<br>
Rodney Lott<br>
<br><div><font color="#990099">-----syslog-ng-bounces@lists.balabit.hu wrote: -----<br><br></font><blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><font face="monospace" size="3"><br><br>by using a template and including the received timestamp instead of the<br>one in the log message, e.g.<br><br>file("/var/log/messages" template("$R_ISODATE $HOST $MSG\n"));<br><br>
<br>Maybe I should add a keep_timestamp(yes|no) option that would be similar<br>to keep_hostname(), e.g. keep_timestamp(yes) would prefer to use the<br>timestamp that was sent by the peer, and keep_timestamp(no) would<br>regenerate the timestamp. This is an alternative solution, however it<br>might be nice to avoid having to write an explicit template for this<br>cases.<br><br>Any opinions?<br><br>-- <br>Bazsi<br><br>_______________________________________________<br>syslog-ng maillist - syslog-ng@lists.balabit.hu<br><a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>Frequently asked questions at <a href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a><br><br></font></blockquote><br></div></div>