ILayout Format Method Apache log4net™ SDK Documentation
Implement this method to create your own layout format.

Namespace: log4net.Layout
Assembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
Syntax

void Format(
	TextWriter writer,
	LoggingEvent loggingEvent
)
Remarks

This method is called by an appender to format the loggingEvent as text and output to a writer.

If the caller does not have a OnlineTextWriter and prefers the event to be formatted as a OnlineString then the following code can be used to format the event into a OnlineStringWriter.

StringWriter writer = new StringWriter();
Layout.Format(writer, loggingEvent);
string formattedEvent = writer.ToString();
See Also