Functions - log

printDebug

Logs the specified value at DEBUG level.

printError

Logs the specified message at ERROR level.

printInfo

Logs the specified message at INFO level.

printTrace

Logs the specified message at TRACE level.

printWarn

Logs the specified message at WARN level.

printDebug

(string | function() returns (string) msg)

Logs the specified value at DEBUG level.

 log:printDebug("debug log");

Parameters

  • msg string | function() returns (string)
  • The message to be logged

printError

(string | function() returns (string) msg, error? err)

Logs the specified message at ERROR level.

 error e = error("error occurred");
 log:printError("error log with cause", err = e);

Parameters

  • msg string | function() returns (string)
  • The message to be logged

  • err error? (default ())
  • The error struct to be logged

printInfo

(string | function() returns (string) msg)

Logs the specified message at INFO level.

 log:printInfo("info log");

Parameters

  • msg string | function() returns (string)
  • The message to be logged

printTrace

(string | function() returns (string) msg)

Logs the specified message at TRACE level.

 log:printTrace("trace log");

Parameters

  • msg string | function() returns (string)
  • The message to be logged

printWarn

(string | function() returns (string) msg)

Logs the specified message at WARN level.

 log:printWarn("warn log");

Parameters

  • msg string | function() returns (string)
  • The message to be logged