memLogFunctions.logImplf

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

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 passed condition must be true.

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

Parameters

condition bool

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

msg string

The printf-style string.

args A

The data that should be logged.

Examples

auto s = new FileLogger(stderr);
s.tracef(true, "is number %d", 1);
s.infof(true, "is number %d", 2);
s.errorf(false, "is number %d", 3);
s.criticalf(someFunc(), "is number %d", 4);
s.fatalf(true, "is number %d", 5);

Meta

Suggestion Box / Bug Report