[python-win32] Puzzling Event Log entry
Jorgensen, Jens
jens.jorgensen@tallan.com
Tue, 10 Jul 2001 14:01:58 -0500
This isn't really a problem. Note the actual API call for reporting an
event:
BOOL ReportEvent(
HANDLE hEventLog, // handle to event log
WORD wType, // event type
WORD wCategory, // event category
DWORD dwEventID, // event identifier
PSID lpUserSid, // user security identifier
WORD wNumStrings, // number of strings to merge
DWORD dwDataSize, // size of binary data
LPCTSTR *lpStrings, // array of strings to merge
LPVOID lpRawData // binary data buffer
);
It's got a lot more than just a string. The call you are making likely
just passes 255 for the dwEventID, which the event logging api expects
to be an index to look up a message from and there's no message there.
You can just ignore this--it doesn't mean that anything's wrong.
Jim Vickroy wrote:
>Hello all,
>
>I'm attempting to create "services" and have them place messages in the
>Event Log.
>
>Here is the initial portion of my "run" method for a service:
>
> def SvcDoRun (self):
> """
> Perpetually:
> deletes *old* files in the receiving dock
> pauses a fixed interval of time
>
> Responds to a STOP request by exiting the perpetual loop and
>returning.
> """
>
> # Put: "service started" message in Win Event Log.
> import servicemanager
> servicemanager.LogInfoMsg ('SXI receiving dock scrubber started.')
>
> # Remainder of implementation here.
>
>When the service, containing the above method, is started, the
>"Properties" attribute of the event log entry contains the following
>message:
>
>------------------------------
>The description for Event ID ( 255 ) in Source ( PythonService ) cannot
>be found. The local computer may not have the necessary registry
>information or message DLL files to display messages from a remote
>computer. The following information is part of the event: SXI receiving
>dock scrubber started.
>------------------------------
>
>Note, my 'SXI receiving dock scrubber started.' message is there, but
>there is also some sort of problem. What have I overlooked?
>
>My setup is:
>
>Python 2.0
>win32 extensions
>Windows 2000
>
>Thanks for your time.
>
>
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>
--
Jens B. Jorgensen
jens.jorgensen@tallan.com