C# Class log4net.Appender.WmiLayout

Mostrar archivo Open project: aurora-sim/Aurora-Libs Class Usage Examples

Public Methods

Method Description
Format ( log4net.Core.LoggingEvent loggingEvent ) : IEvent

Formats a LoggingEvent for instrumentation

If the LoggingEvent.MessageObject of the loggingEvent is an IEvent then that instance is returned. If the instance also implements the IWmiBoundEvent interface then the IWmiBoundEvent.Bind method will be called on the instance with the loggingEvent parameter.

If the LoggingEvent.MessageObject of the loggingEvent is not an IEvent then the CreateEvent method will be called to create an appropriate instrumentation event object.

Protected Methods

Method Description
CreateEvent ( log4net.Core.LoggingEvent loggingEvent ) : IEvent

Create the IEvent instance that should be fired

The default implementation of this method creates a WmiLoggingEvent instance using the data from the loggingEvent.

Subclasses should override this method to return their own custom instrumentation event object.

Method Details

CreateEvent() protected method

Create the IEvent instance that should be fired

The default implementation of this method creates a WmiLoggingEvent instance using the data from the loggingEvent.

Subclasses should override this method to return their own custom instrumentation event object.

protected CreateEvent ( log4net.Core.LoggingEvent loggingEvent ) : IEvent
loggingEvent log4net.Core.LoggingEvent the containing the data
return IEvent

Format() public method

Formats a LoggingEvent for instrumentation

If the LoggingEvent.MessageObject of the loggingEvent is an IEvent then that instance is returned. If the instance also implements the IWmiBoundEvent interface then the IWmiBoundEvent.Bind method will be called on the instance with the loggingEvent parameter.

If the LoggingEvent.MessageObject of the loggingEvent is not an IEvent then the CreateEvent method will be called to create an appropriate instrumentation event object.

public Format ( log4net.Core.LoggingEvent loggingEvent ) : IEvent
loggingEvent log4net.Core.LoggingEvent the containing the data
return IEvent