imod.logging.pythonlogger.PythonLogger#

class imod.logging.pythonlogger.PythonLogger(log_level: LogLevel, add_default_stream_handler: bool, add_default_file_handler: bool)[source]#

Bases: ILogger

The PythonLogger is used to log messages using the default python logging framework.

__init__(log_level: LogLevel, add_default_stream_handler: bool, add_default_file_handler: bool) None[source]#

Methods

__init__(log_level, ...)

critical(message[, additional_depth])

Log message with severity 'CRITICAL'.

debug(message[, additional_depth])

Log message with severity 'DEBUG'.

error(message[, additional_depth])

Log message with severity 'ERROR'.

info(message[, additional_depth])

Log message with severity 'INFO'.

log(loglevel, message[, additional_depth])

logs a message with the specified urgency level.

warning(message[, additional_depth])

Log message with severity 'WARNING'.

critical(message: str, additional_depth: int = 0) None[source]#

Log message with severity ‘CRITICAL’.

Parameters:
  • message (str) – message to be logged

  • additional_depth (Optional[int]) – additional depth level. Use this to correct the filename and line number when you add logging to a decorator

debug(message: str, additional_depth: int = 0) None[source]#

Log message with severity ‘DEBUG’.

Parameters:
  • message (str) – message to be logged

  • additional_depth (Optional[int]) – additional depth level. Use this to correct the filename and line number when you add logging to a decorator

error(message: str, additional_depth: int = 0) None[source]#

Log message with severity ‘ERROR’.

Parameters:
  • message (str) – message to be logged

  • additional_depth (Optional[int]) – additional depth level. Use this to correct the filename and line number when you add logging to a decorator

info(message: str, additional_depth: int = 0) None[source]#

Log message with severity ‘INFO’.

Parameters:
  • message (str) – message to be logged

  • additional_depth (Optional[int]) – additional depth level. Use this to correct the filename and line number when you add logging to a decorator

log(loglevel: LogLevel, message: str, additional_depth: int = 0) None#

logs a message with the specified urgency level.

warning(message: str, additional_depth: int = 0) None[source]#

Log message with severity ‘WARNING’.

Parameters:
  • message (str) – message to be logged

  • additional_depth (Optional[int]) – additional depth level. Use this to correct the filename and line number when you add logging to a decorator