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.

  1. void logImplf(bool condition, string msg, A args)
  2. void logImplf(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 string msg
    ,
    lazy A args
    )

Parameters

msg string

The printf-style string.

args A

The data that should be logged.

Examples

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

Meta