core.logging.logger
Logger Objects
class Logger(logging.Logger)
A customized logger offering advanced formatting and parameters listing.
This logger and its corresponding Formatter display the log level, scope, as well as a parameters listing
in a color-rich format for easy readability.
__init__
def __init__(name: str, level: int = logging.INFO)
Arguments:
name- The name of the logger.level- The maximum level for log entries to be displayed.
setLevel
def setLevel(level: int) -> None
Sets the logging level of this logger.
Arguments:
level- The maximum level for entries to be logged.
debug
def debug(msg: str,
*,
scope: str | None = None,
flush: bool = False,
**kwargs) -> None
Logs a debugging message.
Arguments:
msg- The text to log.scope- The scope of the entry.flush- Whether to immediately flush the log.**kwargs- Any additional parameters.
info
def info(msg: str,
*,
scope: str | None = None,
flush: bool = False,
**kwargs) -> None
Logs an information message.
Arguments:
msg- The text to log.scope- The scope of the entry.flush- Whether to immediately flush the log.**kwargs- Any additional parameters.
warning
def warning(msg: str,
*,
scope: str | None = None,
flush: bool = False,
**kwargs) -> None
Logs a warning message.
Arguments:
msg- The text to log.scope- The scope of the entry.flush- Whether to immediately flush the log.**kwargs- Any additional parameters.
error
def error(msg: str,
*,
scope: str | None = None,
flush: bool = False,
**kwargs) -> None
Logs an error message.
Arguments:
msg- The text to log.scope- The scope of the entry.flush- Whether to immediately flush the log.**kwargs- Any additional parameters.