Logger

class pycomo.helper.logger.RegexFilter(pattern)

Filter incoming warning messages with regex patterns. Intended for common warnings of imported packages, that are expected with correct behaviour of PyCoMo.

filter(record)

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

pycomo.helper.logger.configure_logger(level=None, log_file=None)

Configure the logger with log-level and/or log file location.

Parameters:
  • level – One of: “debug”, “info”, “warning”, “error”

  • log_file – Location for the log file

pycomo.helper.logger.get_logger_conf()

Get the current configuration of the logger (level and file location).

Returns:

tuple of log-level and log-filename