I'm trying to do application logging to the windows event log in c# with .net framework 4, but when I insert the log entries the TimeCreated field (Event viewer -> Windows Logs -> Application -> -> Details -> Friendly View -> System) gets a value like
[SystemTime] 2012-03-28T11:07:12.000000000Z
As you see the sub-second accuracy is missing, although I can see some other event in the viewer where there are numbers also after the "." indicating a more precise timestamp.
Is this some kind of a limitation of the .Net Framework/CLR/C# or am I just doing things wrong?
Thanks.
VS2010SP1, Win7/Server 2008 R2 environment.
UPDATE:
I could mention I've tried with
EventLog.WriteEntry("applicationName", "message", logEntryType, (int)eventId, (short)taskCategory);
and log4net's EventLogAppender so far.
UPDATE 2:
So, using ETW for inserting events to the event log actually produces events where the SystemTime has a sub-second resolution. Could it be that this is actually necessary, feels like overkill for my case.