8.4.9. pymodaq_utils.logger module
Created the 27/10/2022
@author: Sebastien Weber
- pymodaq_utils.logger.get_module_name(module__file__path)[source]
from the full path of a module extract its name
- pymodaq_utils.logger.set_logger(logger_name, add_handler=False, base_logger=False, add_to_console=False, log_level=None, logger_base_name='pymodaq')[source]
defines a logger of a given name and eventually add an handler to it
- Parameters:
logger_name (
(str) the nameofthe logger (usually it is the module name as returned by get_module_name)from (add_handler (bool) if True adds a TimedRotatingFileHandler to the logger instance (should be True if logger set) – main app
base_logger (
(bool) specify if this is the parent logger (usually where one defines the handler))
- Returns:
logger
- Return type: