logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy Chastain" <...@roychastain.org>
Subject RE: precise time stamp
Date Thu, 12 Nov 2009 13:02:40 GMT
I have never thought about the granularity of the time source being
used, but I have log entries as often as 1 ms apart.

Now that I think about this, why do you believe that your are limited to
15ms resolution.  The documentation for System.DateTime says it uses 100
nanosecond ticks.

I simply place the time stamp in the log entry with the following
conversion pattern
<param name="ConversionPattern" value="%d{dd HH:mm:ss.fff} [%4t]
%P{instance}::%M - %m%n" />

This yields the following entries
20 10:28:12.214 [ServiceThread] GSNT(17)::.ctor - Constructed -
20 10:28:12.215 [ServiceThread] FCICMSD::.ctor - Constructed OpenId -

Since this is a service, I put the day in and then the time.

Roy Chastain

-----Original Message-----
From: Ayrat Khalimov [mailto:airat.halimov@gmail.com] 
Sent: Thursday, November 12, 2009 07:49
To: log4net-user@logging.apache.org
Subject: precise time stamp

Hi, there

I need to log events with precise time stamps (more precise than 15 ms

But it seems to be impossible to do it with log4net. 
It is impossible to change default timer neither to implement special
appender that will set precise value to TimeStamp.
The only solution I see is to write precise time to the event message

Any ideas, colleagues?

Ayrat Khalimov.

View raw message