logging#

class utils.logging.NMLogger(name: str, level: str = 'INFO')[source]#

Subclass of logging.Logger with some extra functionality

log_to_file(path: str | PathLike, mode: str = 'w')[source]#

Add file handlers to the logger

Parameters:
  • path (directory where to save logfiles)

  • mode (str, ('w', 'a')) – w: overwrite files a: append to files

set_level(level: str)[source]#

Set console logging level