Base interface for classes that are used for categorized logging.
interface
|
ILogger
|
extends
|
ILogMessageSource
|
||
IPleaseIncludeInBinaryThanks
|
The category of this logger.
property
|
Category
{
get
}
|
||
type
|
ILoggerCategory
|
||
value
|
|
The logger category. |
Returns the full name of this logger.
property
|
FullName
{
get
}
|
||
type
|
string
|
||
value
|
|
The full name. |
Returns the number of well-known log message templates.
property
|
MessageCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of message templates. |
See also:
MessagePrepareReturns the name of this logger.
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The name. |
Sets or gets the log message severity that shall be emitted for this log message source.
property
|
Severity
{
get
}
|
||
type
|
LogSeverity
|
||
value
|
The log message severity. | ||
inherited
|
ILogMessageSource.Severity
|
Adds a log message handler to this log message source.
method
|
AddHandler
([Owner]
ILogMessageHandler handler,
bool replace = false)
|
||
type
|
ILogMessageSource
|
||
params
|
handler
|
[not-null]
|
The handler to add. |
replace
|
Replace existing handler if redundant (see remarks)? | ||
returns
|
|
this | |
inherited
|
ILogMessageSource.AddHandler
|
Remarks:
If there already is a handler which makes the given one redundant (see IsRedundant), one of the following actions is performed:
true
,
the
existing
handler
is
replaced
with
the
given
handler.
false
(which
is
the
default),
the
given
handler
is
discarded.
Changes the log message severity of this log message source.
method
|
ChangeSeverity
(LogSeverity severity,
bool descendants = false,
bool ancestors = false)
|
||
params
|
severity
|
The new log message severity. | |
descendants
|
Also
set
all
descendant
log
message
sources
to
the
given
log
message
severity?
Defaults
to
false .
|
||
ancestors
|
Set
the
log
message
severity
of
all
ancestor
log
message
sources
to
the
given
log
message
severity
if
less
detailed?
Defaults
to
false .
|
||
inherited
|
ILogMessageSource.ChangeSeverity
|
Checks if the given log severity is enabled for this logger.
method
|
IsEnabled
(LogSeverity severity)
|
||
type
|
bool
|
||
params
|
severity
|
The log severity. | |
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Emits a log messages of the given severity.
method
|
Message
(LogSeverity severity,
string message)
|
||
params
|
severity
|
The log message severity. | |
message
|
The log message to emit. |
Returns the idx-th well-known log message template.
method
|
MessageAt
(int32 idx)
|
||
type
|
ILogMessage
|
||
params
|
idx
|
[0..MessageCount-1]
|
The message template index. |
returns
|
|
The log message template. |
Creates a new well-known log message template.
method
|
MessagePrepare
(string name,
LogSeverity severity = LogSeverity.Common,
string label = null)
|
||
type
|
ILogMessage
|
||
params
|
name
|
[not-empty]
|
The human-readable name that describes the template. |
severity
|
The message severity. Defaults to Common. | ||
label
|
The
message
label
(see
From)
or
null
to
use
Any.
Defaults
to
null .
|
||
returns
|
|
The log message template object. |
This is a no-op method that forces the compiler / linker to include this type in the resulting binary.
method
|
PleaseIncludeInBinaryThanks
()
|
||
inherited
|
IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks
|
Remarks:
Calling this stub method makes sure that all lazy constructor calls have been made.
To initialize everything, an application needs to call this method on its root module(s) (see TinmanModule), followed by a call to PleaseIncludeInBinaryThanksAll.
Removes the given log message handle from this log message source.
method
|
RemoveHandler
(ILogMessageHandler handler)
|
||
type
|
ILogMessageSource
|
||
params
|
handler
|
[not-null]
|
The handler to remove. |
returns
|
|
this | |
inherited
|
ILogMessageSource.RemoveHandler
|
Emits a log messages of severity Common.
method
|
Common
(string message)
|
||
params
|
message
|
The log message to emit. |
Emits a log messages of severity Debug.
method
|
Debug
(string message)
|
||
params
|
message
|
The log message to emit. |
Emits a log messages of severity Error.
method
|
Error
(string message)
|
||
params
|
message
|
The log message to emit. |
Emits a log messages of severity Fatal.
method
|
Fatal
(string message)
|
||
params
|
message
|
The log message to emit. |
Emits a log messages of severity Info.
method
|
Info
(string message)
|
||
params
|
message
|
The log message to emit. |
Checks if the given log severity Common is enabled for this logger.
method
|
IsCommonEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Common is enabled for this logger.
method
|
IsDebugEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Common is enabled for this logger.
method
|
IsErrorEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Common is enabled for this logger.
method
|
IsFatalEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Common is enabled for this logger.
method
|
IsInfoEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Trace is enabled for this logger.
method
|
IsTraceEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Checks if the given log severity Warning is enabled for this logger.
method
|
IsWarningEnabled
()
|
||
type
|
bool
|
||
returns
|
true
if
the
log
severity
is
enabled,
false
if
it
is
disabled.
|
Emits a log messages of severity Trace.
method
|
Trace
(string message)
|
||
params
|
message
|
The log message to emit. |
Emits a log messages of severity Warning.
method
|
Warning
(string message)
|
||
params
|
message
|
The log message to emit. |