SimpleLayout ClassApache log4net™ SDK Documentation
A very simple layout
Inheritance Hierarchy

SystemObject
  log4net.LayoutLayoutSkeleton
    log4net.LayoutSimpleLayout

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

public class SimpleLayout : LayoutSkeleton

The SimpleLayout type exposes the following members.

Constructors

  NameDescription
Public methodSimpleLayout
Constructs a SimpleLayout
Top
Properties

  NameDescription
Public propertyContentType
The content type output by this layout.
(Inherited from LayoutSkeleton.)
Public propertyFooter
The footer for the layout format.
(Inherited from LayoutSkeleton.)
Public propertyHeader
The header for the layout format.
(Inherited from LayoutSkeleton.)
Public propertyIgnoresException
Flag indicating if this layout handles exceptions
(Inherited from LayoutSkeleton.)
Top
Methods

  NameDescription
Public methodActivateOptions
Initialize layout options
(Overrides LayoutSkeletonActivateOptions.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFormat(LoggingEvent)
Convenience method for easily formatting the logging event into a string variable.
(Inherited from LayoutSkeleton.)
Public methodFormat(TextWriter, LoggingEvent)
Produces a simple formatted output.
(Overrides LayoutSkeletonFormat(TextWriter, LoggingEvent).)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Remarks

SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself. For example,

DEBUG - Hello world

See Also

Reference