cobra.utils.logging

Module Contents

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.

warn(msg, *args, **kwargs)

Deprecated name for warning.

warning(msg, *args, **kwargs)

Log a message with severity 'WARNING'.

Attributes

CRITICAL

DEBUG

ERROR

INFO

NOTSET

WARNING

cobra.utils.logging.CRITICAL
cobra.utils.logging.DEBUG
cobra.utils.logging.ERROR
cobra.utils.logging.INFO
cobra.utils.logging.NOTSET
cobra.utils.logging.WARNING
cobra.utils.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, …)

cobra.utils.logging.critical(msg, *args, **kwargs)

Log a message with severity ‘CRITICAL’.

cobra.utils.logging.debug(msg, *args, **kwargs)

Log a message with severity ‘DEBUG’.

cobra.utils.logging.error(msg, *args, **kwargs)

Log a message with severity ‘ERROR’.

cobra.utils.logging.flush()

Tell logger to empty output buffers.

cobra.utils.logging.getEffectiveLevel()

Return the level the logger is set at.

cobra.utils.logging.getLogger()

Get the custom logger.

Return type:

logging.Logger

cobra.utils.logging.info(msg, *args, **kwargs)

Log a message with severity ‘INFO’.

cobra.utils.logging.setLevel(level)

Set the logger level.

cobra.utils.logging.warn(msg, *args, **kwargs)

Deprecated name for warning.

cobra.utils.logging.warning(msg, *args, **kwargs)

Log a message with severity ‘WARNING’.