Skip to content

Latest commit

 

History

History
 
 

NLog.WindowsEventLog

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

NLog EventLog Target

NLog EventLog Target writes to the Windows EventLog.

If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog

See the NLog Wiki for available options and examples.

Register Extension

NLog will only recognize type-alias eventlog when loading from NLog.config-file, if having added extension to NLog.config-file:

<extensions>
    <add assembly="NLog.WindowsEventLog"/>
</extensions>

Alternative register from code using fluent configuration API:

LogManager.Setup().SetupExtensions(ext => {
   ext.RegisterTarget<NLog.Targets.EventLogTarget>();
});