XmlLayoutSchemaLog4j Class | Apache log4net™ SDK Documentation

Layout that formats the log events as XML elements compatible with the log4j schema
Inheritance Hierarchy

System
Object
log4net.Layout
LayoutSkeleton
log4net.Layout
XmlLayoutBase
log4net.Layout
XmlLayoutSchemaLog4j

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

C#
VB
C++
F#
Copy

    public class XmlLayoutSchemaLog4j : XmlLayoutBase

    Public Class XmlLayoutSchemaLog4j
    	Inherits XmlLayoutBase

    public ref class XmlLayoutSchemaLog4j : public XmlLayoutBase

    type XmlLayoutSchemaLog4j =
        class
            inherit XmlLayoutBase
        end

The XmlLayoutSchemaLog4j type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| XmlLayoutSchemaLog4j | Constructs an XMLLayoutSchemaLog4j
| XmlLayoutSchemaLog4j(Boolean) | Constructs an XMLLayoutSchemaLog4j.

Top
Properties

| Name | Description
--- | --- | ---
| ContentType | Gets the content type output by this layout. (Inherited from XmlLayoutBase.)
| 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.)
| InvalidCharReplacement | 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. (Inherited from XmlLayoutBase.)
| LocationInfo | Gets a value indicating whether to include location information in the XML events. (Inherited from XmlLayoutBase.)
| Version | The version of the log4j schema to use.

Top
Methods

| Name | Description
--- | --- | ---
| ActivateOptions | Initialize layout options (Inherited from XmlLayoutBase.)
| 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 formatted string. (Inherited from XmlLayoutBase.)
| FormatXml | Actually do the writing of the xml (Overrides XmlLayoutBase FormatXml(XmlWriter, 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

Formats the log events according to the http://logging.apache.org/log4j schema.

See Also

#### Reference

log4net.Layout Namespace