Logger¶
Get the Mr Mustard module specific logger and configure it if needed. |
create_logger¶
- mrmustard.utils.logger.create_logger(name, level=20)[source]¶
Get the Mr Mustard module specific logger and configure it if needed.
Configuration only takes place if no user configuration was applied to the logger. Therefore, the logger is configured if and only if the following are true:
the logger has WARNING as effective level,
the level of the logger was not explicitly set,
no handlers were added to the logger.
As the root logger has a WARNING level by default, any module specific logger will inherit the same as effective level.
The default handler that is used for configuration writes to the standard error stream and uses a datetime and level formatter.
- Parameters:
name (str) – the name of the module for which the logger is being created
level (logging.level) – the logging level to set for the logger