[python-win32] Python parser for Windows Event Logs
Tony Cappellini
cappy2112 at gmail.com
Fri Jul 17 00:15:21 CEST 2009
I've added the While loop Mark suggested but still see the same issue.
GetNumberOfEventLogRecords() still returns 6 events,
However the object returned from ReadEvenLog() still only contains 3 objects
The next call to ReadeventLog() returns None
flags = win32evtlog.EVENTLOG_BACKWARDS_READ|win32evtlog.EVENTLOG_SEQUENTIAL_READ
events = win32evtlog.ReadEventLog(hand, flags, 0)
>>> events
[<PyEventLogRecord object at 0x00C5C998>, <PyEventLogRecord object at
0x00C5C9E0>, <PyEventLogRecord object at 0x00C5CA28>]
Would anyone be willing to try parsing their own SystemEvent log to
see if they have the same issue (or parse min log and see if the
results are the same) ?
On 7/11/09, Mark Hammond <skippy.hammond at gmail.com> wrote:
> Check out the ReadEventLog code in win32evtlogutil.py - you will notice you
> need a loop like:
>
> while 1:
> objects = win32evtlog.ReadEventLog(h, readFlags, 0)
> if not objects:
> break
>
> Mark
More information about the python-win32
mailing list