Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

XmlLayoutBase.Format�Method�(TextWriter, LoggingEvent)

Produces a formatted string.

[Visual�Basic]
Overrides�Overloads�Public�Sub�Format( _
���ByVal writer�As�TextWriter,�_
���ByVal loggingEvent�As�LoggingEvent�_
)�_
����Implements�ILayout.Format
[C#]
public�override�void�Format(
���TextWriterwriter,
���LoggingEventloggingEvent
);

Parameters

writer
The TextWriter to write the formatted event to
loggingEvent
The event being logged.

Implements

ILayout.Format

Remarks

Format the LoggingEvent and write it to the TextWriter.

This method creates an XmlTextWriter that writes to the writer. The XmlTextWriter is passed to the FormatXml method. Subclasses should override the FormatXml method rather than this method.

See Also

XmlLayoutBase Class | log4net.Layout Namespace | XmlLayoutBase.Format Overload List