pantagruel
2009-05-10 10:29:52 UTC
Hi,
I am starting a process that along with a number of other processes
writes to a custom event log. This process executes periodically a
task.
At the time of task starting I register a time, and when the task is
finished I want to get all the entries to the custom log executed
during the task.
The query I was using was the following:
String WMIQuery = "SELECT * FROM Win32_NTLogEvent WHERE Logfile =
'RenderingServices' AND TimeWritten >= '" + convertdate + "'";
The datetime when my task started was
20090510110129.5000000+0200
the datetime when my task ended was at
20090510110132.6718750+0200
during that time there were a number of entries written to the event
log but one thing I am noticing when I look at it is that the events
which I know are written after the task was started nonetheless every
event that is written is at time 20090510110132.000000+12.
So the question is - any way to do the query in a different way to get
all messages written after the starting time? Any way to set the
correct time when writing event log entries (using .NET in most of the
applications)
Thanks,
Bryan Rasmussen
I am starting a process that along with a number of other processes
writes to a custom event log. This process executes periodically a
task.
At the time of task starting I register a time, and when the task is
finished I want to get all the entries to the custom log executed
during the task.
The query I was using was the following:
String WMIQuery = "SELECT * FROM Win32_NTLogEvent WHERE Logfile =
'RenderingServices' AND TimeWritten >= '" + convertdate + "'";
The datetime when my task started was
20090510110129.5000000+0200
the datetime when my task ended was at
20090510110132.6718750+0200
during that time there were a number of entries written to the event
log but one thing I am noticing when I look at it is that the events
which I know are written after the task was started nonetheless every
event that is written is at time 20090510110132.000000+12.
So the question is - any way to do the query in a different way to get
all messages written after the starting time? Any way to set the
correct time when writing event log entries (using .NET in most of the
applications)
Thanks,
Bryan Rasmussen