SimpleLayout Class | Apache log4net™ SDK Documentation

A very simple layout
Inheritance Hierarchy

System
Object
log4net.Layout
LayoutSkeleton
log4net.Layout
SimpleLayout

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

C#
VB
C++
F#
Copy

    public class SimpleLayout : LayoutSkeleton

    Public Class SimpleLayout
    	Inherits LayoutSkeleton

    public ref class SimpleLayout : public LayoutSkeleton

    type SimpleLayout =
        class
            inherit LayoutSkeleton
        end

The SimpleLayout type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| SimpleLayout | Constructs a SimpleLayout

Top
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.)

Top
Methods

| Name | Description
--- | --- | ---
| ActivateOptions | Initialize layout options (Overrides LayoutSkeleton ActivateOptions .)
| Equals | Determines whether the specified Object is equal to the current Object. (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 LayoutSkeleton Format(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 | 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,

Copy

    DEBUG - Hello world

See Also

#### Reference

log4net.Layout Namespace