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.log - multiple declarations

Function log

This function logs data.

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

void log(T, string moduleName = __MODULE__) (
  const LogLevel ll,
  lazy bool condition,
  lazy T arg,
  int line = __LINE__,
  string file = __FILE__,
  string funcName = __FUNCTION__,
  string prettyFuncName = __PRETTY_FUNCTION__
);

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.

Parameters

NameDescription
ll The LogLevel used by this log call.
condition The condition must be true for the data to be logged.
args The data that should be logged.

Example

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

Function log

This function logs data.

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

void log(T, string moduleName = __MODULE__) (
  const LogLevel ll,
  lazy T arg,
  int line = __LINE__,
  string file = __FILE__,
  string funcName = __FUNCTION__,
  string prettyFuncName = __PRETTY_FUNCTION__
);

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.

Parameters

NameDescription
ll The LogLevel used by this log call.
args The data that should be logged.

Example

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

Function log

This function logs data.

void log(int line = __LINE__, string file = __FILE__, string funcName = __FUNCTION__, string prettyFuncName = __PRETTY_FUNCTION__, string moduleName = __MODULE__, A...) (
  lazy bool condition,
  lazy A args
)
if (args.length != 1);

void log(T, string moduleName = __MODULE__) (
  lazy bool condition,
  lazy T arg,
  int line = __LINE__,
  string file = __FILE__,
  string funcName = __FUNCTION__,
  string prettyFuncName = __PRETTY_FUNCTION__
);

In order for the data to be processed the LogLevel of the sharedLog must be greater or equal to the defaultLogLevel add 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

log(true, "Hello World", 3.1415);

Function log

This function logs data.

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

In order for the data to be processed the LogLevel of the sharedLog must be greater or equal to the defaultLogLevel.

Parameters

NameDescription
args The data that should be logged.

Example

log("Hello World", 3.1415);

Authors

License