nabu.resources.logger module¶
- class nabu.resources.logger.Logger(loggername, level='DEBUG', logfile='logger.log', console=True)[source]¶
Bases:
object
Configure a Logger object.
- Parameters:
loggername (str) – Logger name.
level (str, optional) – Logging level. Can be “debug”, “info”, “warning”, “error”, “critical”. Default is “debug”.
logfile (str, optional) – File where the logs are written. If set to None, the logs are not written in a file. Default is “logger.log”.
console (bool, optional) – If set to True, the logs are (also) written in stdout/stderr. Default is True.
- warn(msg)¶