Package archipelcore :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

this module contains some functions that allow objects to use advanced logging functionalities or others common stuffs

Classes [hide private]
  TNArchipelLogger
archipel logger implt
  ColorFormatter
Archipel log formatter
Functions [hide private]
 
init_conf(paths)
This method initialize the configuration object (that will be passed to all entities) from a given path.
source code
 
init_log(conf)
Initialize the logger
source code
 
build_error_iq(originclass, ex, iq, code=-1, ns='archipel:error:generic') source code
 
build_error_message(originclass, ex, msg) source code
Variables [hide private]
  ARCHIPEL_NS_GENERIC_ERROR = 'archipel:error:generic'
  ARCHIPEL_LOG_LEVEL = 0
  ARCHIPEL_LOG_DEBUG = 0
  ARCHIPEL_LOG_INFO = 1
  ARCHIPEL_LOG_WARNING = 2
  ARCHIPEL_LOG_ERROR = 3
  log = logging.getLogger('archipel')
  __package__ = 'archipelcore'
Function Details [hide private]

init_conf(paths)

source code 

This method initialize the configuration object (that will be passed to all entities) from a given path.

Parameters:
  • paths - list of the paths of the config files to read @return : the ConfigParser object containing the configuration
  • path (List)

init_log(conf)

source code 

Initialize the logger

Parameters:
  • conf (ConfigParser) - the configuration where to read log info