log
log provides functionality for logging messages at various severity levels.
Functions
debug(msg, *misc, **kv)
Logs a message at the debug log level.
Parameters
name | type | description |
|---|---|---|
|
| The message to log. |
|
| Additional message arguments will be concatenated to the message string separated by a space. |
|
| Key-value pairs to provide additional debug information. |
Examples
basic
Log a debug message with additional information.
info(msg, *misc, **kv)
Logs a message at the info log level.
Parameters
name | type | description |
|---|---|---|
|
| The message to log. |
|
| Additional message arguments will be concatenated to the message string separated by a space. |
|
| Key-value pairs to provide additional information. |
Examples
basic
Log an info message with additional information.
warn(msg, *misc, **kv)
Logs a message at the warn log level.
Parameters
name | type | description |
|---|---|---|
|
| The message to log. |
|
| Additional message arguments will be concatenated to the message string separated by a space. |
|
| Key-value pairs to provide additional warning information. |
Examples
basic
Log a warning message with additional information.
error(msg, *misc, **kv)
Logs a message at the error log level and returns an error.
Parameters
name | type | description |
|---|---|---|
|
| The message to log. |
|
| Additional message arguments will be concatenated to the message string separated by a space. |
|
| Key-value pairs to provide additional error information. |
Examples
basic
Log an error message with additional information.
fatal(msg, *misc, **kv)
Logs a message at the error log level, returns a fail(msg) to halt program execution.
Parameters
name | type | description |
|---|---|---|
|
| The message to log. |
|
| Additional message arguments will be concatenated to the message string separated by a space. |
|
| Key-value pairs to provide additional fatal error information. |
Examples
basic
Log a fatal error message with additional information.