Class SimpleLayout
A very simple layout
public class SimpleLayout : LayoutSkeleton, ILayout, IOptionHandler
- Inheritance
-
SimpleLayout
- Implements
- Inherited Members
Remarks
SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself. For example,
DEBUG - Hello world
Constructors
SimpleLayout()
Constructs a SimpleLayout
public SimpleLayout()
Methods
ActivateOptions()
Initialize layout options
public override void ActivateOptions()
Remarks
This is part of the IOptionHandler delayed object activation scheme. The ActivateOptions() method must be called on this object after the configuration properties have been set. Until ActivateOptions() is called this object is in an undefined state and must not be used.
If any of the configuration properties are modified then ActivateOptions() must be called again.
Format(TextWriter, LoggingEvent)
Produces a simple formatted output.
public override void Format(TextWriter writer, LoggingEvent loggingEvent)
Parameters
writerTextWriterThe TextWriter to write the formatted event to
loggingEventLoggingEventthe event being logged
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.