libranet_logging.logconfig
libranet_logging.logconfig.
Attributes
Functions
Return a sorted list of loglevel-names. |
|
|
|
|
Convert relative filenames in the handlers to absolute paths. |
|
Remove lower-level handlers from dedicated-level loggers. |
|
|
Returns the path to the default logging configuration file. |
|
Returns the path to the default logging configuration file. |
|
|
Return a fully resolved logging configuration as a dictionary. |
|
Initialize logging configuration with a yaml-file. |
Module Contents
- libranet_logging.logconfig.log
- libranet_logging.logconfig.get_sorted_lognames()
Return a sorted list of loglevel-names.
- Return type:
list[str]
- libranet_logging.logconfig.remove_console(config, disable_console=False)
- Parameters:
config (dict)
disable_console (bool)
- Return type:
dict
Returns:
- libranet_logging.logconfig.convert_filenames(config, logdir='')
Convert relative filenames in the handlers to absolute paths.
- Parameters:
config (dict)
- Return type:
dict
- libranet_logging.logconfig.remove_lower_level_handlers(config)
Remove lower-level handlers from dedicated-level loggers.
- We have dedicated file-handlers for each logging-level
debug_file_handler
info_file_handler
warning_file_handler
error_file_handler
If the root-level is set higher, we remove the lower-level handlers This avoids creating logfiles that will always remain empty.
- Parameters:
config (dict)
- Return type:
dict
- libranet_logging.logconfig.output_logging_tree(use_print=False)
- Parameters:
use_print
Returns:
- libranet_logging.logconfig.get_default_logging_yaml()
Returns the path to the default logging configuration file.
- Returns:
A Traversable Path object representing the path to the default logging configuration file.
- Return type:
importlib_resources.abc.Traversable
- libranet_logging.logconfig.get_default_logging_yaml()
Returns the path to the default logging configuration file.
- Returns:
A Traversable Path object representing the path to the default logging configuration file.
- Return type:
importlib_resources.abc.Traversable
- libranet_logging.logconfig.get_dict_config(path='', logdir='', variables=None)
Return a fully resolved logging configuration as a dictionary.
- Parameters:
path (str)
- Return type:
dict
- libranet_logging.logconfig.initialize(path='', logdir='', capture_warnings=True, silent=False, use_print=False, variables=None)
Initialize logging configuration with a yaml-file.
- Parameters:
path
logdir
capture_warnings (bool)
silent (bool)
use_print (bool)
variables
Returns: