common.logger.logger module

The central logger module of the application

This module defines a module-level singleton of logger, that the other parts of the application can use within the trivial name of logger.

It is also responsible to make the logger configable, via the selected parameters, in the meaning of setting the LOG_LEVEL and the LOG_FORMAT.

The module provides helper functions to access to the logger instance, as well as to enable the command line parser to gain the list of possible choices for log level and format.

common.logger.logger.get_level_choices()

Provides the list of valid log level names

Return Array[str]

The array of log-level names possible to use within the actual implementation of the logger.

common.logger.logger.get_format_choices()

Provides the list of valid log format names

Return Array[str]

The array of log-formats possible to use within the actual implementation of the logger.

common.logger.logger.get_logger()

Returns with the application logger

Returns

the logger object

common.logger.logger.init_logger(log_level: str, log_format: str)

Configures the logger instance

Parameters
  • log_level (str) – The selected log level to use.

  • log_format (str) – The selected log format to use.

Returns

the logger object