The OpenD Programming Language

log

This function logs data.

In order for the data to be processed, the LogLevel of the log call must be greater or equal to the LogLevel of the sharedLog and the defaultLogLevel; additionally the condition passed must be true.

  1. void log(LogLevel ll, bool condition, A args)
    pragma(inline, true)
    void
    log
    (
    int line = __LINE__
    string file = __FILE__
    string funcName = __FUNCTION__
    string prettyFuncName = __PRETTY_FUNCTION__
    string moduleName = __MODULE__
    A...
    )
    (
    const LogLevel ll
    ,
    lazy bool condition
    ,
    lazy A args
    )
    if (
    args.length != 1
    )
  2. void log(LogLevel ll, bool condition, T arg, int line, string file, string funcName, string prettyFuncName)
  3. void log(LogLevel ll, A args)
  4. void log(LogLevel ll, T arg, int line, string file, string funcName, string prettyFuncName)
  5. void log(bool condition, A args)
  6. void log(bool condition, T arg, int line, string file, string funcName, string prettyFuncName)
  7. void log(A args)

Parameters

ll LogLevel

The LogLevel used by this log call.

condition bool

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

args A

The data that should be logged.

Examples

log(LogLevel.warning, true, "Hello World", 3.1415);

Meta