logging
¶
Helpers for TekHSI logging.
LoggingLevels
¶
Bases: Enum
A class holding the valid logging levels supported.
CRITICAL
class-attribute
instance-attribute
¶
CRITICAL = 'CRITICAL'
An enum member representing the CRITICAL logging level.
DEBUG
class-attribute
instance-attribute
¶
DEBUG = 'DEBUG'
An enum member representing the DEBUG logging level.
ERROR
class-attribute
instance-attribute
¶
ERROR = 'ERROR'
An enum member representing the ERROR logging level.
INFO
class-attribute
instance-attribute
¶
INFO = 'INFO'
An enum member representing the INFO logging level.
NONE
class-attribute
instance-attribute
¶
NONE = 'NONE'
An enum member indicating no logging messages should be captured.
WARNING
class-attribute
instance-attribute
¶
WARNING = 'WARNING'
An enum member representing the WARNING logging level.
configure_logging
¶
configure_logging(
*,
log_console_level: Union[str, LoggingLevels] = INFO,
log_file_level: Union[str, LoggingLevels] = DEBUG,
log_file_directory: Union[str, PathLike[str], Path] | None = None,
log_file_name: str | None = None,
log_colored_output: bool = False
) -> Logger
Configure the logging for this package.
Note
After this function is called once, if it is called again, it will not perform any additional configuration. It will simply return the base logger for the package.
| Parameters: |
|
|---|
| Returns: |
|
|---|