View source code
Display the source code in std/experimental/logger/core.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

std.experimental.logger.core.Logger.memLogFunctions.logImpl - multiple declarations

Function Logger.memLogFunctions.logImpl

This function logs data to the used Logger.

void logImpl(int line = __LINE__, string file = __FILE__, string funcName = __FUNCTION__, string prettyFuncName = __PRETTY_FUNCTION__, string moduleName = __MODULE__, A...) (
  lazy A args
)
if (args.length == 0 || args.length > 0 && !is(A[0] : bool));

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.

Parameters

NameDescription
args The data that should be logged.

Example

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

Function Logger.memLogFunctions.logImpl

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

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
);

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.

Parameters

NameDescription
condition The condition must be true for the data to be logged.
args The data that should be logged.

Example

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");

Authors

License