Win32evtlogutil.ReportEvent() - more info please?

Mark Hammond mhammond at skippinet.com.au
Fri Jan 25 00:08:49 EST 2002


Dale Strickland-Clark wrote:
> P349 of Python Programming on Win32 explains writing to the event log
> and mentions that win32evtlog.pyd and win32service.pyd include a set
> of generic messages.
> 
> It doesn't seem to explain how to use them.
> 
> When I register my message source with
> Win32evtlogutil.AddSourceToRegistry(), what do I use for the
> MessageDll?

The path to the DLL that contains your messages.  By default, 
win32evtlogutil registers the win32evtlog.pyd file as the message source.

> Then how do I use one of these generic messages so that the Event
> Viewer presents logged messages cleanly?

You should then be able to use win32evtlogutil.ReportEvent(), passing 
the same appname as you previously registered.

Mark.




More information about the Python-list mailing list