Hi

Problem is solved, syslogd is logging the timestamp. I missed to set the
timestamp in my event.

...
ch.qos.logback.classic.spi.LoggingEvent event = new LoggingEvent();
event.setTimeStamp(System.currentTimeMillis()); // this was missing
...

Without setting the timestamp, the event used ts=0, which was converted
to Jan 01 01:00:00.


cheers

-andreas

On 05/22/2013 02:54 PM, Andreas Kruthoff wrote:
Hi


I'm using the SyslogAppender and am writing to a remote syslogd, using a
local1.info facility and a logfile.

All messages in syslog have the timestamp "Jan 01 01:00:00".

As I can't influence the layout of this appender
(http://logback.qos.ch/codes.html#syslog_layout), I wonder where this
timestamp comes from. I've used wireshark and seen that logback is
sending this date to syslogd. Is this a defect or am I missing something?

I've checked log4j with wireshark. The header isn't created, and there's
no timestamp in the transmitted message. Syslog is filling in its own
timestamp in this case, which is correct.

logback 1.0.12
solaris 10.


thx

-andreas


This email and any attachment may contain confidential information which is 
intended for use only by the addressee(s) named above. If you received this 
email by mistake, please notify the sender immediately, and delete the email 
from your system. You are prohibited from copying, disseminating or otherwise 
using the email or any attachment.

_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to