timor.utilities.logging

Attributes

CRITICAL

DEBUG

ERROR

INFO

NOTSET

VERBOSE_DEBUG

WARNING

Functions

basicConfig([filename, filemode, output_format, ...])

Set logging configurations for the runtime environment

critical(msg, *args, **kwargs)

Log a message with severity 'CRITICAL'.

debug(msg, *args, **kwargs)

Log a message with severity 'DEBUG'.

error(msg, *args, **kwargs)

Log a message with severity 'ERROR'.

flush()

Tell logger to empty output buffers.

getEffectiveLevel()

Return the level the logger is set at.

getLogger()

Get the custom logger.

info(msg, *args, **kwargs)

Log a message with severity 'INFO'.

setLevel(level)

Set the logger level.

verbose_debug(msg, *args, **kwargs)

Log a message with severity 'VERBOSE_DEBUG', i.e., very low.

warn(msg, *args, **kwargs)

Deprecated name for warning.

warning(msg, *args, **kwargs)

Log a message with severity 'WARNING'.

Module Contents

timor.utilities.logging.CRITICAL = 50
timor.utilities.logging.DEBUG = 10
timor.utilities.logging.ERROR = 40
timor.utilities.logging.INFO = 20
timor.utilities.logging.NOTSET = 0
timor.utilities.logging.VERBOSE_DEBUG = 5
timor.utilities.logging.WARNING = 30
timor.utilities.logging.basicConfig(filename=None, filemode='w', output_format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=INFO)

Set logging configurations for the runtime environment

Parameters:
  • filename (str) – Name to store logs to

  • filemode (str) – Mode (append (‘a’), overwrite (‘w’), …)

  • output_format (str) – Format string for log

  • datefmt (str) – Specify time in logs

  • level (Union[int, str]) – Logging level for the logger (use logging.DEBUG, WARN, …)

timor.utilities.logging.critical(msg, *args, **kwargs)

Log a message with severity ‘CRITICAL’.

timor.utilities.logging.debug(msg, *args, **kwargs)

Log a message with severity ‘DEBUG’.

timor.utilities.logging.error(msg, *args, **kwargs)

Log a message with severity ‘ERROR’.

timor.utilities.logging.flush()

Tell logger to empty output buffers.

timor.utilities.logging.getEffectiveLevel()

Return the level the logger is set at.

timor.utilities.logging.getLogger()

Get the custom logger.

Return type:

logging.Logger

timor.utilities.logging.info(msg, *args, **kwargs)

Log a message with severity ‘INFO’.

timor.utilities.logging.setLevel(level)

Set the logger level.

timor.utilities.logging.verbose_debug(msg, *args, **kwargs)

Log a message with severity ‘VERBOSE_DEBUG’, i.e., very low.

timor.utilities.logging.warn(msg, *args, **kwargs)

Deprecated name for warning.

timor.utilities.logging.warning(msg, *args, **kwargs)

Log a message with severity ‘WARNING’.