Skip to content
jasonlaflair edited this page Oct 11, 2012 · 2 revisions

Writes log message to the Event Log.

Supported in .NET and Mono ##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](Configuration file). ##Parameters ###General Options name - Name of the target. ###Layout Options layout - Layout used to format log messages. [Layout](Data types) 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. The categories must be predefined for the specified source and needs to be numeric. 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

Clone this wiki locally