EventLog target
If you want to contribute, please create a user account and contact Jarek to get edit access.
Writes log message to the Event Log.
Supported in

Configuration Syntax
<targets>
<target xsi:type="EventLog"
name="String"
layout="Layout"
machineName="String"
source="String"
category="Layout"
eventId="Layout"
log="String" />
</targets>
Read more about using the Configuration File.<target xsi:type="EventLog"
name="String"
layout="Layout"
machineName="String"
source="String"
category="Layout"
eventId="Layout"
log="String" />
</targets>
Parameters
- General Options
- name - Name of the target.
- Layout Options
- layout - Layout used to format log messages.Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message}
- Event Log Options
- machineName - Name of the machine on which Event Log service is running. Default: .
- source - Value to be used as the event Source.By default this is the friendly name of the current AppDomain.
- category - Layout that renders event Category.Layout
- eventId - Layout that renders event ID.Layout
- log - Name of the Event Log to write to. This can be System, Application or any user-defined name. Default: Application




