XmlLayoutBase ClassApache log4net™ SDK Documentation
Layout that formats the log events as XML elements.
Inheritance Hierarchy

SystemObject
  log4net.LayoutLayoutSkeleton
    log4net.LayoutXmlLayoutBase
      log4net.LayoutXmlLayout
      log4net.LayoutXmlLayoutSchemaLog4j

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

public abstract class XmlLayoutBase : LayoutSkeleton

The XmlLayoutBase type exposes the following members.

Constructors

  NameDescription
Protected methodXmlLayoutBase
Protected constructor to support subclasses
Protected methodXmlLayoutBase(Boolean)
Protected constructor to support subclasses
Top
Properties

  NameDescription
Public propertyContentType
Gets the content type output by this layout.
(Overrides LayoutSkeletonContentType.)
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.)
Public propertyInvalidCharReplacement
The string to replace characters that can not be expressed in XML with.
Remarks

Not all characters may be expressed in XML. This property contains the string to replace those that can not with. This defaults to a ?. Set it to the empty string to simply remove offending characters. For more details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets Character replacement will occur in the log message, the property names and the property values.

Public propertyLocationInfo
Gets a value indicating whether to include location information in the XML events.
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 formatted string.
(Overrides LayoutSkeletonFormat(TextWriter, LoggingEvent).)
Protected methodFormatXml
Does the actual writing of the XML.
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

This is an abstract class that must be subclassed by an implementation to conform to a specific schema.

Deriving classes must implement the FormatXml(XmlWriter, LoggingEvent) method.

See Also

Reference