hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Functions
utils.logging_config Namespace Reference

Functions

def logging_default_config (root_level=logging.TRACE, console_level=logging.INFO, syslog_level=logging.DEBUG, disable_existing_loggers=True)
 This simple utility function configures default python logging to log on stdout and SYSLOG with default configuration and formatters.
 
def show_dict_fields (prefix, dict1)
 
def show_log (k, v)
 
def show_logs_and_handlers ()
 

Function Documentation

◆ logging_default_config()

def utils.logging_config.logging_default_config (   root_level = logging.TRACE,
  console_level = logging.INFO,
  syslog_level = logging.DEBUG,
  disable_existing_loggers = True 
)

This simple utility function configures default python logging to log on stdout and SYSLOG with default configuration and formatters.

The default level is INFO. If it is called a second time, by default it will disable ALL existing loggers (disable_existing_loggers = True). If called with disable_existing_loggers = False, ALL existing loggers will be enabled. The function also resets the handlers and only cii-console and SYSLOG will be set, i.e. any other handler will be removed. disable_existing_loggers (default True): if specified as False, loggers which exist when this call is made are left enabled. The default is True because this enables old behaviour in a backward-compatible way. This behaviour is to disable any existing non-root loggers unless they or their ancestors are explicitly named in the logging configuration.

◆ show_dict_fields()

def utils.logging_config.show_dict_fields (   prefix,
  dict1 
)

◆ show_log()

def utils.logging_config.show_log (   k,
  v 
)

◆ show_logs_and_handlers()

def utils.logging_config.show_logs_and_handlers ( )