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

Implement this method to create your own layout format.

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

C#
VB
C++
F#
Copy

    public abstract void Format(
    	TextWriter writer,
    	LoggingEvent loggingEvent
    )

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

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

    abstract 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 to format

#### Implements

ILayout
Format(TextWriter, LoggingEvent)
Remarks

This method is called by an appender to format the loggingEvent as text.

See Also

#### Reference

LayoutSkeleton Class
Format Overload
log4net.Layout Namespace