Abstract base class for ILogMessageHandler implementations that use an ILogMessageFormat object for formatting log messages.
abstract class
|
FormattedMessageHandler
|
extends
|
LogMessageHandler
|
||
base of
|
FileMessageHandler
|
The log message format.
public
property
|
Format
{
get
}
|
||
type
|
ILogMessageFormat
|
||
value
|
|
The log message format object. |
Handles the given log message.
public
override
method
|
HandleLogMessage
(ILogger source,
LogSeverity logSeverity,
string logMessage)
|
||
params
|
source
|
[not-null]
|
The ILogger that has been used to emit the log message. |
logSeverity
|
The LogSeverity of the log message. | ||
logMessage
|
[not-null]
|
The log message | |
implements
|
LogMessageHandler.HandleLogMessage
|
Remarks:
All exceptions that are thrown by implementing methods are dropped silently.
Checks if this log message handler is redundant if the given one is already present.
public
override
method
|
IsRedundant
(ILogMessageHandler other)
|
||
type
|
bool
|
||
params
|
other
|
[not-null]
|
The other handler. |
returns
|
true
if
this
log
message
handler
is
redundant,
false
if
not.
|
||
implements
|
LogMessageHandler.IsRedundant
|
Changes the maximum log severity of this handler.
public
virtual
method
|
Severity
(LogSeverity severity)
|
||
type
|
ILogMessageHandler
|
||
params
|
severity
|
The new maximum log severity. | |
returns
|
|
The resulting log message handler. | |
inherited
|
LogMessageHandler.Severity
|
protected
abstract
property
|
Columns
{
get
}
|
||
type
|
int32
|
||
value
|
Creates a new instance of FormattedMessageHandler.
protected
constructor
|
FormattedMessageHandler
(ILogMessageFormat format)
|
||
params
|
format
|
[not-null]
|
The log message format to use. |
Emits the given formatted log message.
protected
abstract
method
|
EmitLogMessage
(string msg,
LogSeverity severity)
|
||
params
|
msg
|
The formatted log message. | |
severity
|
The log message severity. |