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.
std.logger.core.Logger.memLogFunctions.logImplf
- multiple declarations
Function Logger.memLogFunctions.logImplf
This function logs data to the used Logger
in a
printf
-style manner.
void logImplf(int line = __LINE__, string file = __FILE__, string funcName = __FUNCTION__, string prettyFuncName = __PRETTY_FUNCTION__, string moduleName = __MODULE__, A...)
(
lazy bool condition,
lazy string msg,
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 passed condition must be true
.
Parameters
Name | Description |
---|---|
condition | The condition must be true for the data to be logged. |
msg | The printf -style string. |
args | The data that should be logged. |
Example
auto s = new FileLogger(stderr);
s .tracef(true, "is number %d", 1);
s .infof(true, "is number %d", 2);
s .errorf(false, "is number %d", 3);
s .criticalf(someFunc(), "is number %d", 4);
s .fatalf(true, "is number %d", 5);
Function Logger.memLogFunctions.logImplf
This function logs data to the used Logger
in a
printf
-style manner.
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
);
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
Name | Description |
---|---|
msg | The printf -style string. |
args | The data that should be logged. |
Example
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);
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.