View source code
Display the source code in std/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.

Alias std.logger.core.error

This function logs data to the stdThreadLocalLog, optionally depending on a condition.

alias error = defaultLogFunction!(LogLevel.error);

In order for the resulting log message to be logged the LogLevel must be greater or equal than the LogLevel of the stdThreadLocalLog and must be greater or equal than the global LogLevel. Additionally the LogLevel must be greater or equal than the LogLevel of the stdSharedLogger. If a condition is given, it must evaluate to true.


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


trace(1337, "is number");
info(1337, "is number");
error(1337, "is number");
critical(1337, "is number");
fatal(1337, "is number");
trace(true, 1337, "is number");
info(false, 1337, "is number");
error(true, 1337, "is number");
critical(false, 1337, "is number");
fatal(true, 1337, "is number");