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 -
Id/Base/Count/Type:
f4119ba3-ce74-4729-bac9-ccfe5a9b300e/o2203/6/NumericOnly
20 10:28:12.215 [ServiceThread] FCICMSD::.ctor - Constructed OpenId -
Name/VDest/Pool: FCICMSD/FCICMS/GSNT(17)
Since this is a service, I put the day in and then the time.
----------------------------------------------------------------------
Roy Chastain
-----Original Message-----
From: Ayrat Khalimov [mailto:[email protected]]
Sent: Thursday, November 12, 2009 07:49
To: [email protected]
Subject: precise time stamp
Hi, there
I need to log events with precise time stamps (more precise than 15 ms
System.DateTime).
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
body.
Any ideas, colleagues?
--
Sincerely,
Ayrat Khalimov.