A very simple layout
Inheritance Hierarchy
log4net.LayoutLayoutSkeleton
log4net.LayoutSimpleLayout
Namespace: log4net.Layout
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax
The SimpleLayout type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| SimpleLayout |
Constructs a SimpleLayout
|
Properties
| Name | Description | |
|---|---|---|
| ContentType |
The content type output by this layout.
(Inherited from LayoutSkeleton.) | |
| Footer |
The footer for the layout format.
(Inherited from LayoutSkeleton.) | |
| Header |
The header for the layout format.
(Inherited from LayoutSkeleton.) | |
| IgnoresException |
Flag indicating if this layout handles exceptions
(Inherited from LayoutSkeleton.) |
Methods
| Name | Description | |
|---|---|---|
| ActivateOptions |
Initialize layout options
(Overrides LayoutSkeletonActivateOptions.) | |
| Equals | (Inherited from Object.) | |
| Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| Format(LoggingEvent) |
Convenience method for easily formatting the logging event into a string variable.
(Inherited from LayoutSkeleton.) | |
| Format(TextWriter, LoggingEvent) |
Produces a simple formatted output.
(Overrides LayoutSkeletonFormat(TextWriter, LoggingEvent).) | |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| ToString | (Inherited from Object.) |
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