LogBuilder

A fluent builder for constructing a log message using method chaining.

Members

Functions

exc
LogBuilder exc(Exception exception)

Sets the exception of the log.

log
void log(string moduleName, string functionName, string fileName, size_t lineNumber)

Builds the log message and adds it to the logger associated with this builder, and adds source context information using default function arguments.

lvl
LogBuilder lvl(Level level)

Sets the level of the log message.

msg
LogBuilder msg(string message)

Sets the message of the log.

Static functions

forLogger
LogBuilder forLogger(Logger logger)

Creates a log builder for the given logger.