Logger.log

Logs an exception message. It creates a basic message string formatted like "ExceptionName: message".

  1. void log(LogMessage msg)
  2. void log(Level level, string msg, Exception exception, string moduleName, string functionName, string fileName, size_t lineNumber)
  3. void log(Level level, Exception exception, string moduleName, string functionName, string fileName, size_t lineNumber)
    struct Logger
    void
    log
    (,
    Exception exception
    ,
    string moduleName = __MODULE__
    ,
    string functionName = __PRETTY_FUNCTION__
    ,
    string fileName = __FILE__
    ,
    size_t lineNumber = __LINE__
    )

Parameters

level Level

The log level.

exception Exception

The exception that prompted this log.

moduleName string

The name of the module. This will resolve to the current module name by default.

functionName string

The name of the function. This will resolve to the current function name by default.

fileName string

The name of the source file. This will resolve to the current source file by default.

lineNumber size_t

The line number in the source file. This will resolve to the current source file's line number by default.