Implement this method to create your own layout format.
Assembly: log4net (in log4net.dll) Version: 184.108.40.206-.NET 4.0
void Format( TextWriter writer, LoggingEvent loggingEvent )
Sub Format ( writer As TextWriter, loggingEvent As LoggingEvent )
void Format( TextWriter^ writer, LoggingEvent^ loggingEvent )
abstract Format : writer : TextWriter * loggingEvent : LoggingEvent -> unit
- Type: System.IOTextWriter
The TextWriter to write the formatted event to
- Type: log4net.CoreLoggingEvent
The event to format
This method is called by an appender to format the loggingEvent as text and output to a writer.
StringWriter writer = new StringWriter(); Layout.Format(writer, loggingEvent); string formattedEvent = writer.ToString();