[python-win32] win32evtlog

Srihari Vijayaraghavan harisri at telstra.com
Fri Mar 26 00:42:11 EST 2004


Hello,

I am trying to get just the "Information" (or "Warning") type events from eventlog, and it seems to fail:
1. from win32evtlog import *
2. handle = OpenEventLog("", "system")
3. flags = EVENTLOG_BACKWARDS_READ |\
           EVENTLOG_SEQUENTIAL_READ |\ 
           EVENTLOG_INFORMATION_TYPE
4. l = ReadEventLog(handle, flags, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
pywintypes.error: (87, 'ReadEventLog', 'The parameter is incorrect.')

These combinations it works great however:
EVENTLOG_ERROR_TYPE (for system and application log)
EVENTLOG_AUDIT_SUCCESS and EVENTLOG_AUDIT_FAILURE (for security log)

So I am not sure what is wrong with my flags parameter. Can someone please assist me?

And Oh I am on Windows 2000 Professional sp3, Python 2.3.3 and pywin32-200.

Thanks
Hari
                                                                      




More information about the Python-win32 mailing list