Note about caller location information.
The following patterns %type %file %line %method %location %class %C %F %L %l %M
all generate caller location information.
Location information uses the System.Diagnostics.StackTrace class to generate
a call stack. The caller's information is then extracted from this stack.
The System.Diagnostics.StackTrace class is not supported on the
.NET Compact Framework 1.0 therefore caller location information is not
available on that framework.
The System.Diagnostics.StackTrace class has this to say about Release builds:
"StackTrace information will be most informative with Debug build configurations.
By default, Debug builds include debug symbols, while Release builds do not. The
debug symbols contain most of the file, method name, line number, and column
information used in constructing StackFrame and StackTrace objects. StackTrace
might not report as many method calls as expected, due to code transformations
that occur during optimization."
This means that in a Release build the caller information may be incomplete or may
not exist at all! Therefore caller location information cannot be relied upon in a Release build.
Additional pattern converters may be registered with a specific
instance using the method.
This is a more detailed pattern.
%timestamp [%thread] %level %logger %ndc - %message%newline
A similar pattern except that the relative time is
right padded if less than 6 digits, thread name is right padded if
less than 15 characters and truncated if longer and the logger
name is left padded if shorter than 30 characters and truncated if
longer.
%-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline
Nicko Cadell
Gert Driesen
Douglas de la Torre
Daniel Cazzulino
Default pattern string for log output.
Default pattern string for log output.
Currently set to the string "%message%newline"
which just prints the application supplied message.
A detailed conversion pattern
A conversion pattern which includes Time, Thread, Logger, and Nested Context.
Current value is %timestamp [%thread] %level %logger %ndc - %message%newline.
Internal map of converter identifiers to converter types.
This static map is overridden by the m_converterRegistry instance map
the pattern
the head of the pattern converter chain
patterns defined on this PatternLayout only
Initialize the global registry
Defines the builtin global rules.
Constructs a PatternLayout using the DefaultConversionPattern
The default pattern just produces the application supplied message.
Note to Inheritors: This constructor calls the virtual method
. If you override this method be
aware that it will be called before your is called constructor.
As per the contract the
method must be called after the properties on this object have been
configured.
Constructs a PatternLayout using the supplied conversion pattern
the pattern to use
Note to Inheritors: This constructor calls the virtual method
. If you override this method be
aware that it will be called before your is called constructor.
When using this constructor the method
need not be called. This may not be the case when using a subclass.
Create the pattern parser instance
the pattern to parse
The that will format the event
Creates the used to parse the conversion string. Sets the
global and instance rules on the .
Initialize layout options
This is part of the delayed object
activation scheme. The method must
be called on this object after the configuration properties have
been set. Until is called this
object is in an undefined state and must not be used.
If any of the configuration properties are modified then
must be called again.
Produces a formatted string as specified by the conversion pattern.
the event being logged
The TextWriter to write the formatted event to
Parse the using the patter format
specified in the property.
Add a converter to this PatternLayout
the converter info
This version of the method is used by the configurator.
Programmatic users should use the alternative method.
Add a converter to this PatternLayout
the name of the conversion pattern for this converter
the type of the converter
Add a named pattern converter to this instance. This
converter will be used in the formatting of the event.
This method must be called before .
The specified must extend the
type.
The pattern formatting string
The ConversionPattern option. This is the string which
controls formatting and consists of a mix of literal content and
conversion specifiers.
Wrapper class used to map converter names to converter types
Pattern converter info class used during configuration to
pass to the
method.
default constructor
Gets or sets the name of the conversion pattern
The name of the pattern in the format string
Gets or sets the type of the converter
The value specified must extend the
type.
Type converter for the interface
Used to convert objects to the interface.
Supports converting from the interface to
the interface using the .
Nicko Cadell
Gert Driesen
Interface supported by type converters
This interface supports conversion from arbitrary types
to a single target type. See .
Nicko Cadell
Gert Driesen
Can the source type be converted to the type supported by this object
the type to convert
true if the conversion is possible
Test if the can be converted to the
type supported by this converter.
Convert the source object to the type supported by this object
the object to convert
the converted object
Converts the to the type supported
by this converter.
Can the sourceType be converted to an
the source to be to be converted
true if the source type can be converted to
Test if the can be converted to a
. Only is supported
as the .
Convert the value to a object
the value to convert
the object
Convert the object to a
object. If the object
is a then the
is used to adapt between the two interfaces, otherwise an
exception is thrown.
Extract the value of a property from the
Extract the value of a property from the
Nicko Cadell
Constructs a RawPropertyLayout
Lookup the property for
The event to format
returns property value
Looks up and returns the object value of the property
named . If there is no property defined
with than name then null will be returned.
The name of the value to lookup in the LoggingEvent Properties collection.
Value to lookup in the LoggingEvent Properties collection
String name of the property to lookup in the .
Extract the date from the
Extract the date from the
Nicko Cadell
Gert Driesen
Constructs a RawTimeStampLayout
Gets the as a .
The event to format
returns the time stamp
Gets the as a .
The time stamp is in local time. To format the time stamp
in universal time use .
Extract the date from the
Extract the date from the
Nicko Cadell
Gert Driesen
Constructs a RawUtcTimeStampLayout