ExceptionLayout Class | Apache log4net™ SDK Documentation

A Layout that renders only the Exception text from the logging event
Inheritance Hierarchy

System
Object
log4net.Layout
LayoutSkeleton
log4net.Layout
ExceptionLayout

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

C#
VB
C++
F#
Copy

    public class ExceptionLayout : LayoutSkeleton

    Public Class ExceptionLayout
    	Inherits LayoutSkeleton

    public ref class ExceptionLayout : public LayoutSkeleton

    type ExceptionLayout =
        class
            inherit LayoutSkeleton
        end

The ExceptionLayout type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| ExceptionLayout | Default constructor

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 | Activate component 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) | Gets the exception text from the logging event (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

A Layout that renders only the Exception text from the logging event.

This Layout should only be used with appenders that utilize multiple layouts (e.g. AdoNetAppender).

See Also

#### Reference

log4net.Layout Namespace