Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

AppenderSkeleton.RenderLoggingEvent�Method�(TextWriter, LoggingEvent)

Renders the LoggingEvent to a string.

[Visual�Basic]
Overloads�Protected�Sub�RenderLoggingEvent( _
���ByVal writer�As�TextWriter,�_
���ByVal loggingEvent�As�LoggingEvent�_
)
[C#]
protected�void�RenderLoggingEvent(
���TextWriterwriter,
���LoggingEventloggingEvent
);

Parameters

writer
The TextWriter to write the formatted event to
loggingEvent
The event to render.

Remarks

Helper method to render a LoggingEvent to a string. This appender must have a Layout set to render the loggingEvent to a string.

If there is exception data in the logging event and the layout does not process the exception, this method will append the exception text to the rendered string.

Use this method in preference to RenderLoggingEvent where possible. If, however, the caller needs to render the event to a string then RenderLoggingEvent does provide an efficient mechanism for doing so.

See Also

AppenderSkeleton Class | log4net.Appender Namespace | AppenderSkeleton.RenderLoggingEvent Overload List