The OpenD Programming Language

Logger.logf

This method logs data to the used Logger with the LogLevel of the this Logger in a printf-style manner.

In order for the data to be processed the LogLevel of the Logger must be greater or equal to the global LogLevel.

  1. void logf(LogLevel ll, bool condition, string msg, A args)
  2. void logf(LogLevel ll, string msg, A args)
  3. void logf(bool condition, string msg, A args)
  4. void logf(string msg, A args)
    class Logger
    pragma(inline, true)
    void
    logf
    (
    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 format string used for this log call.

args A

The data that should be logged.

Examples

auto s = new FileLogger(stdout);
s.logf("%d %s", 1337, "is number");
s.logf("%d %s", 1337, "is number");
s.logf("%d %s", 1337, "is number");
s.logf("%d %s", 1337, "is number");
s.logf("%d %s", 1337, "is number");

Meta