Package Pyblosxom :: Module _logging
[hide private]
[frames] | no frames]

Module _logging

source code

Emulates part of the Python2.3 logging module.

Note: This will probably not work with Python < 2.2.

Classes [hide private]
  Filterer
A stripped down version of the logging.Filterer class.
  StreamHandler
A stripped down version of the logging.StreamHandler class.
  FileHandler
A stripped down version of the logging.FileHandler class.
  Formatter
A stripped down version of the logging.Formatter class.
  LogRecord
A stripped down version of the logging.LogRecord class.
  Logger
A stripped down version of the logging.Logger class.
Functions [hide private]
 
dump(msg, *args)
Utility function to log stuff while working on the _logging module.
source code
 
__populate_levels()
Fills in the _levels and _level_names dictionaries.
source code
str
getLevelName(level)
Return the textual representation of logging level 'level'.
source code
 
getLogger(log_name=None)
Creates and returns a logging channel.
source code
 
shutdown()
Close logfiles and clear the logger-registry.
source code
Variables [hide private]
  __revision__ = '$Revision: 913 $'
  _devlogfile = '/tmp/dev-log.log'
  _log = None
  CRITICAL = 50
  FATAL = 50
  ERROR = 40
  WARNING = 30
  WARN = 30
  INFO = 20
  DEBUG = 10
  NOTSET = 0
  _names = ['FATAL', 'CRITICAL', 'ERROR', 'WARN', 'WARNING', 'IN...
  _levels = {'CRITICAL': 50, 'DEBUG': 10, 'ERROR': 40, 'FATAL': ...
  _level_names = {0: 'NOTSET', 10: 'DEBUG', 20: 'INFO', 30: 'WAR...
  _srcfile = '/home/willg/pyblosxom/pyblosxom/Pyblosxom/_logging...
  _startTime = 1183403229.7
  _handlers = {}
  _logger_registry = {}
Function Details [hide private]

getLevelName(level)

source code 
Return the textual representation of logging level 'level'.
Parameters:
  • level (int) - Numeric representation of a logging level
Returns: str
Texutal representation of the logging level

getLogger(log_name=None)

source code 
Creates and returns a logging channel. Registers the created logger in the logger-registry for further reference.

Variables Details [hide private]

_names

Value:
['FATAL',
 'CRITICAL',
 'ERROR',
 'WARN',
 'WARNING',
 'INFO',
 'DEBUG',
 'NOTSET']

_levels

Value:
{'CRITICAL': 50,
 'DEBUG': 10,
 'ERROR': 40,
 'FATAL': 50,
 'INFO': 20,
 'NOTSET': 0,
 'WARN': 30,
 'WARNING': 30}

_level_names

Value:
{0: 'NOTSET',
 10: 'DEBUG',
 20: 'INFO',
 30: 'WARNING',
 40: 'ERROR',
 50: 'CRITICAL'}

_srcfile

Value:
'/home/willg/pyblosxom/pyblosxom/Pyblosxom/_logging.py'