ExceptionLayout Format Method (TextWriter, LoggingEvent) | Apache log4net™ SDK Documentation

Gets the exception text from the logging event

Namespace: log4net.Layout
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public override void Format(
    	TextWriter writer,
    	LoggingEvent loggingEvent
    )

    Public Overrides Sub Format (
    	writer As TextWriter,
    	loggingEvent As LoggingEvent
    )

    public:
    virtual void Format(
    	TextWriter^ writer,
    	LoggingEvent^ loggingEvent
    ) override

    abstract Format :
            writer : TextWriter *
            loggingEvent : LoggingEvent -> unit
    override Format :
            writer : TextWriter *
            loggingEvent : LoggingEvent -> unit

#### Parameters

writer
  Type: System.IO
  TextWriter
  The TextWriter to write the formatted event to
loggingEvent
  Type: log4net.Core
  LoggingEvent
  the event being logged

#### Implements

ILayout
Format(TextWriter, LoggingEvent)
Remarks

Write the exception string to the TextWriter. The exception string is retrieved from [M:LoggingEvent.GetExceptionString()].

See Also

#### Reference

ExceptionLayout Class
Format Overload
log4net.Layout Namespace