StdForwardLogger

The StdForwardLogger will always forward anything to the sharedLog.

The StdForwardLogger will not throw if data is logged with LogLevel.fatal.

class StdForwardLogger : Logger {}

Constructors

this
this(LogLevel lv)

The default constructor for the StdForwardLogger.

Inherited Members

From Logger

LogEntry
struct LogEntry

LogEntry is a aggregation combining all information associated with a log message. This aggregation will be passed to the method writeLogMsg.

writeLogMsg
void writeLogMsg(LogEntry payload)

A custom logger must implement this method in order to work in a MultiLogger and ArrayLogger.

logMsgPart
void logMsgPart(const(char)[] msg)

Logs a part of the log message.

finishLogMsg
void finishLogMsg()

Signals that the message has been written and no more calls to logMsgPart follow.

logLevel
LogLevel logLevel [@property getter]
LogLevel logLevel [@property setter]

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.

fatalHandler
void delegate() fatalHandler [@property getter]
void delegate() @(safe) fatalHandler [@property setter]

This delegate is called in case a log message with LogLevel.fatal gets logged.

forwardMsg
void forwardMsg(LogEntry payload)

This method allows forwarding log entries from one logger to another.

memLogFunctions
template memLogFunctions(LogLevel ll)
trace
alias trace = memLogFunctions!(LogLevel.trace).logImpl
tracef
alias tracef = memLogFunctions!(LogLevel.trace).logImplf
info
alias info = memLogFunctions!(LogLevel.info).logImpl
infof
alias infof = memLogFunctions!(LogLevel.info).logImplf
warning
alias warning = memLogFunctions!(LogLevel.warning).logImpl
warningf
alias warningf = memLogFunctions!(LogLevel.warning).logImplf
error
alias error = memLogFunctions!(LogLevel.error).logImpl
errorf
alias errorf = memLogFunctions!(LogLevel.error).logImplf
critical
alias critical = memLogFunctions!(LogLevel.critical).logImpl
criticalf
alias criticalf = memLogFunctions!(LogLevel.critical).logImplf
fatal
alias fatal = memLogFunctions!(LogLevel.fatal).logImpl
fatalf
alias fatalf = memLogFunctions!(LogLevel.fatal).logImplf

This template provides the log functions for the Logger class with the LogLevel encoded in the function name.

log
void log(LogLevel ll, bool condition, A args)
void log(LogLevel ll, bool condition, T args, int line, string file, string funcName, string prettyFuncName)

This method logs data with the LogLevel of the used Logger.

log
void log(LogLevel ll, A args)
void log(LogLevel ll, T args, int line, string file, string funcName, string prettyFuncName, string moduleName)

This function logs data to the used Logger with a specific LogLevel.

log
void log(bool condition, A args)
void log(bool condition, T args, int line, string file, string funcName, string prettyFuncName, string moduleName)

This function logs data to the used Logger depending on a explicitly passed condition with the LogLevel of the used Logger.

log
void log(A args)
void log(T arg, int line, string file, string funcName, string prettyFuncName, string moduleName)

This function logs data to the used Logger with the LogLevel of the used Logger.

logf
void logf(LogLevel ll, bool condition, string msg, A args)

This function logs data to the used Logger with a specific LogLevel and depending on a condition in a printf-style manner.

logf
void logf(LogLevel ll, string msg, A args)

This function logs data to the used Logger with a specific LogLevel in a printf-style manner.

logf
void logf(bool condition, string msg, A 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
void logf(string msg, A args)

This method logs data to the used Logger with the LogLevel of the this Logger in a printf-style manner.

Examples

auto nl1 = new StdForwardLogger(LogLevel.all);

Meta