Evgeny said:
When my application writes to event log the XP (it occurred only on XP
machine!) adds to my message not expected additional info:
For more information, see Help and Support Center at
<
http://go.microsoft.com/fwlink/events.asp>
In short (i.e. approximately and in my words), the architecture of the event
logging mechanism aims to minimize the size of the log file. To that end
applications should create "message files" with the message compiler that
contain static strings for error message text, error category and error
severity. The application then logs only the "dynamic" information
associated with a message and "integer indexes" into the message files for
the static portions of the message. At run time, an administrator uses the
event viewer which builds a message _on the fly_ from the "static" message
files and the "dynamic" information in the event log.
Prior to XP, if you didn't use a message file, the event viewer displayed
only the dynamic text. On XP, the viewer announces to the world that a
developer took a shortcut. It is embarassing and it scares end-users. I
know. :-(
Use a message file. This link describes the event log in detail:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/
event_logging_functions.asp
Jeffery Richter in his book "Programming Server Side Applications for
Microsoft Windows 2000" devotes an entire chapter to the event log and (I
think) includes some sample code on the book's CD to get you started.
Regards,
Will