cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.utils.log Namespace Reference

Functions

def debug
def error
def exception
def get_logger
 Returns logger.
def info
def warning

Variables

tuple active_loggers = set([])

Detailed Description

Author
Gaetano
Date
May 8, 2013

Function Documentation

def src.clm.utils.log.debug (   logger_id,
  text 
)
Parameters
logger_id(int) optional, id of the logger. If no id is provided, logs are anonymus.
text(string) content of the log.

Prints debug log with contetnt to log file of the user id.

Definition at line 73 of file log.py.

def src.clm.utils.log.error (   logger_id,
  text 
)
Parameters
logger_id(int) optional, id of the logger. If no id is provided, logs are anonymus.
text(string) content of the log.

Prints error log with text contetnt to log file of the user logger_id.

Definition at line 121 of file log.py.

def src.clm.utils.log.exception (   logger_id,
  text 
)
Parameters
logger_id(int) optional, id of the logger. If no id is provided, logs are anonymus.
text(string) content of the log.

Prints exception log with text contetnt to log file of the user logger_id.

Definition at line 109 of file log.py.

def src.clm.utils.log.get_logger (   logger_id)

Returns logger.

  • If no logger_id is provided, then logger is anonymus. His logs go to the file intended for storing anonimous logs.
  • Otherwise user is added to active loggers. Function creates unique file handler for his logs.

This way actions may be analyzed per user.

Definition at line 46 of file log.py.

def src.clm.utils.log.info (   logger_id,
  text 
)
Parameters
logger_id(int) optional, id of the logger. If no id is provided, logs are anonymus.
text(string) content of the log.

Prints info log with text contetnt to log file of the user logger_id.

Definition at line 85 of file log.py.

def src.clm.utils.log.warning (   logger_id,
  text 
)
Parameters
logger_id(int) optional, id of the logger. If no logger_id is provided, logs are anonymus.
text(string) content of the log.

Prints warning log with text contetnt to log file of the user logger_id.

Definition at line 97 of file log.py.

Variable Documentation

tuple src.clm.utils.log.active_loggers = set([])

Definition at line 31 of file log.py.