msgpi.utils.logger.initLogger#

msgpi.utils.logger.initLogger(name, cout_level='INFO', fout_level='INFO', filename='log.txt')#

Initialization of a logger.

Parameters
  • name (str) – Name of the logger.

  • cout_level ({'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'}, optional) – Output level of logs to the screen, by default ‘INFO’

  • fout_level ({'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'}, optional) – Output level of logs to a file, by default ‘INFO’

  • filename (str, optional) – Name of the log file, by default ‘log.txt’

Returns

A logger object.

Return type

logging.Logger