Interface IAppender
Implement this interface for your own strategies for printing log statements.
public interface IAppender
Remarks
Implementors should consider extending the AppenderSkeleton class which provides a default implementation of this interface.
Appenders can also implement the IOptionHandler interface. Therefore they would require that the ActivateOptions() method be called after the appenders properties have been configured.
Properties
Name
Gets or sets the name of this appender.
string Name { get; set; }
Property Value
- string
The name of the appender.
Remarks
The name uniquely identifies the appender.
Methods
Close()
Closes the appender and releases resources.
void Close()
Remarks
Releases any resources allocated within the appender such as file handles, network connections, etc.
It is a programming error to append to a closed appender.
DoAppend(LoggingEvent)
Log the logging event in Appender specific way.
void DoAppend(LoggingEvent loggingEvent)
Parameters
loggingEventLoggingEventThe event to log
Remarks
This method is called to log a message into this appender.