View source code
Display the source code in std/logger/multilogger.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Class std.logger.multilogger.MultiLogger
MultiLogger logs to multiple Logger
. The Logger
s are stored in an
Logger[]
in their order of insertion.
Every data logged to this MultiLogger
will be distributed to all the Logger
s inserted into it. This MultiLogger
implementation can
hold multiple Logger
s with the same name. If the method removeLogger
is used to remove a Logger
only the first occurrence with that name will
be removed.
Constructors
Name | Description |
---|---|
this
(lv)
|
A constructor for the MultiLogger Logger.
|
Fields
Name | Type | Description |
---|---|---|
logger
|
MultiLoggerEntry[] | This member holds all Logger s stored in the MultiLogger .
|
Properties
Name | Type | Description |
---|---|---|
fatalHandler [get, set]
|
void delegate() | This delegate is called in case a log message with
LogLevel gets logged.
|
logLevel [get, set]
|
LogLevel | The LogLevel determines if the log call are processed or dropped
by the Logger . In order for the log call to be processed the
LogLevel of the log call must be greater or equal to the LogLevel
of the logger .
|
Methods
Name | Description |
---|---|
insertLogger
(name, newLogger)
|
This method inserts a new Logger into the MultiLogger .
|
removeLogger
()
|
This method removes a Logger from the MultiLogger .
|
factory
(classname)
|
Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. |
forwardMsg
(payload)
|
This method allows forwarding log entries from one logger to another. |
log
(ll, condition, args)
|
This method logs data with the LogLevel of the used Logger .
|
log
(ll, args)
|
This function logs data to the used Logger with a specific
LogLevel .
|
log
(condition, args)
|
This function logs data to the used Logger depending on a
explicitly passed condition with the LogLevel of the used
Logger .
|
log
(args)
|
This function logs data to the used Logger with the LogLevel
of the used Logger .
|
logf
(ll, condition, msg, args)
|
This function logs data to the used Logger with a specific
LogLevel and depending on a condition in a printf -style manner.
|
logf
(ll, msg, args)
|
This function logs data to the used Logger with a specific
LogLevel in a printf -style manner.
|
logf
(condition, msg, args)
|
This function logs data to the used Logger depending on a
condition with the LogLevel of the used Logger in a
printf -style manner.
|
logf
(msg, args)
|
This method logs data to the used Logger with the LogLevel
of the this Logger in a printf -style manner.
|
opCmp
(o)
|
Compare with another Object obj. |
opEquals
(o)
|
Test whether this is equal to o .
The default implementation only compares by identity (using the is operator).
Generally, overrides and overloads for opEquals should attempt to compare objects by their contents.
A class will most likely want to add an overload that takes your specific type as the argument
and does the content comparison. Then you can override this and forward it to your specific
typed overload with a cast. Remember to check for null on the typed overload.
|
toHash
()
|
Compute hash function for Object. |
toString
()
|
Convert Object to a human readable string. |
finishLogMsg
()
|
Signals that the message has been written and no more calls to
logMsgPart follow.
|
logMsgPart
(msg)
|
Logs a part of the log message. |
writeLogMsg
(payload)
|
A custom logger must implement this method in order to work in a
MultiLogger and ArrayLogger .
|
Inner structs
Name | Description |
---|---|
LogEntry
|
LogEntry is a aggregation combining all information associated with a log message. This aggregation will be passed to the method writeLogMsg. |
Aliases
Name | Description |
---|---|
critical
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
criticalf
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
error
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
errorf
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
fatal
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
fatalf
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
info
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
infof
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
trace
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
tracef
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
warning
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
warningf
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
Templates
Name | Description |
---|---|
memLogFunctions
|
This template provides the log functions for the Logger class
with the LogLevel encoded in the function name.
|
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.