Logger module¶
Detailed API reference for the wingpy.logger module, which provides functionality for logging messages, exceptions and events.
You will notice that every client in wingpy uses this module under the hood to log important events and exceptions. But it's very
easy to customize and use it in your own automation scripts as well. We created a few easy helper functions to get you started quickly.
wingpy.logger
¶
logger
¶
logger = Logger(
core=Core(),
exception=None,
depth=0,
record=False,
lazy=False,
colors=False,
raw=False,
capture=True,
patchers=[],
extra={},
)
log_exception
¶
log_exception(
exception: Exception,
severity: Literal[
"TRACE",
"DEBUG",
"INFO",
"SUCCESS",
"WARNING",
"ERROR",
"CRITICAL",
] = "ERROR",
) -> None
Log the exception message using the wingpy logger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
severity
|
str
|
The severity level to log the message at. Default is 'ERROR'. |
'ERROR'
|