warg.logging_utilities.add_logging_handler_once¶
- warg.logging_utilities.add_logging_handler_once(_logger: Logger, handler: object) bool[source]¶
A helper to add a handler to a logger, ensuring there are no duplicates.
- Parameters:
_logger (logging.logger) – Logger that should have a handler added.
handler (logging.Handler) – Handler instance to be added. It will not be added if an instance of that Handler subclass already exists.
- Returns:
True if the logging handler was added, otherwise False.
- Return type: