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

Produces a simple formatted output.

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

Formats the event as the level of the even, followed by " - " and then the log message itself. The output is terminated by a newline.

See Also

#### Reference

SimpleLayout Class
Format Overload
log4net.Layout Namespace