memLogFunctions.logImpl

This function logs data to the used Logger depending on a condition.

In order for the resulting log message to be logged the LogLevel must be greater or equal than the LogLevel of the used Logger and must be greater or equal than the global LogLevel additionally the condition passed must be true.

  1. void logImpl(A args)
  2. void logImpl(bool condition, A args)
    template memLogFunctions(LogLevel ll)
    void
    logImpl
    (
    int line = __LINE__
    string file = __FILE__
    string funcName = __FUNCTION__
    string prettyFuncName = __PRETTY_FUNCTION__
    string moduleName = __MODULE__
    A...
    )
    (
    lazy bool condition
    ,
    lazy A args
    )

Parameters

condition bool

The condition must be true for the data to be logged.

args A

The data that should be logged.

Examples

auto s = new FileLogger(stdout);
s.trace(true, 1337, "is number");
s.info(false, 1337, "is number");
s.error(true, 1337, "is number");
s.critical(false, 1337, "is number");
s.fatal(true, 1337, "is number");

Meta