I want to see about logging events from a Delphi 5 application to the Windows log, and from another post here I see that I can use the TEventLogger
class to do this.
However, I can't find any documentation on the syntax of the TEventLogger.LogMessage
procedure, so I don't know what all the parameters mean, how to use them, or even what possible values are available.
I've tried looking around, and all I find is a page from Embarcadero stating that the function exists, but nothing on its syntax, and MSDN is no help as I can only find the BizTalk version which does me no good.
Does anyone have a help page or information on this that might shed some light on what I can do with it?
TEventLogger
is an internal helper class for TService
.
You log message using the TService.LogMessage()
function, not by calling into TEventLogger
directly. The parameters of LogMessage()
directly match with the parameters of the Win32 API ReportEvent()
function.
Look in the Win32 API documentation for details.
If you are not writing a service application, then you need to call the Win32 API RegisterEventSource()
and ReportEvent()
functions directly instead.