logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Glezen <pgle...@atdial.net>
Subject Re: Time stamping of log messages
Date Sat, 07 Apr 2001 17:02:43 GMT
Rob Walker wrote:
> 
> As a new user I may be raising an obvious or old question here. Is
> there some way log messages can be timestamped when raised
> as opposed to when logged. It's not a big deal for local logging, but
> when logging over slow network links the messages in local file
> based logs show different timestamps to those displayed on
> remote clients.

Hi Rob,

The timestamp is created along with the LoggingEvent in UTC format. 
Even with slow connections, this shouldn't be an issue since the event
is created before it is sent to any appenders.  If you're logging across
timezones, then by default you'll see the time in whatever timezone the
converter is running in.

I'm work on an application that logs across timezones.  The timestamp I
see in the DOS box inside of PC Anywhere connecting to the remote
machine is one hour different than the timestamp I see in a local DOS
box being fed by a SimpleSocketServer.  Since the SimpleSocketServer
also receives events from servers in the same timezone, the log file is
consistent in using a single timezone (the local one).

Does this explain what you are seeing?

- Paul
-- 
Beware of bugs in the above code.  I have
only proved it correct, not tried it.
-Don Knuth

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message