Python reading System/Application Event logs in Windows

David Bolen db3l at fitlinxx.com
Thu Feb 19 19:59:35 EST 2004


"Ellinghaus, Lance" <lance.ellinghaus at eds.com> writes:

> So.... Does anyone have a pointer on how to read the System and Application
> Event logs in the Windows environment from within Python?

Use the win32evtlog module from the pywin32 (previously win32all)
package.  There's an eventtLogDemo.py module in the demos directory
that provides some examples.

There's also the win32evtlogutil module which contains helper
functions such as FormatMessage for translating the event information
into an appropriate message (providing you have the message exe/DLL on
your system).

-- David



More information about the Python-list mailing list