Package conary :: Package lib :: Module log
[hide private]
[frames] | no frames]

Module log

source code

Implements the logging facility for conary.

Similar to the C printf function, the functions in this module take a format string that specifies how the subsequent variables should be converted in the log output.

For example:
  log.error("%s not found", foo)


Classes [hide private]
  SysLog
  ErrorCheckingHandler
  ConaryLogger
Functions [hide private]
 
openSysLog(root, path) source code
 
error(msg, *args)
Log an error
source code
 
warning(msg, *args)
Log a warning
source code
 
info(msg, *args)
Log an informative message
source code
 
debug(msg, *args)
Log a debugging message
source code
 
lowlevel(msg, *args)
Log a low-level debugging message
source code
 
errorOccurred() source code
 
resetErrorOccurred() source code
 
setVerbosity(val) source code
 
getVerbosity() source code
 
setMinVerbosity(val)
Ensures that the log level is at least the given log level.
source code
 
openFormattedLog(path) source code
 
closeFormattedLog(path) source code
 
pushLogDescriptor(desc) source code
 
popLogDescriptor() source code
 
addLogRecordData(key, val) source code
 
delLogRecordData(key) source code
Variables [hide private]
  LOWLEVEL = 5
  syslog = None
  LOGGER_CONARY = 'conary'
  LOGGER_CONARY_FORMATTED = 'conary_formatted'
  logger = logging.getLogger(LOGGER_CONARY)
  hdlr = <conary.lib.log.ErrorCheckingHandler instance at 0x2b2d...
  formatter = logging.Formatter('%(message)s')
  fmtLogger = <conary.lib.log.ConaryLogger instance at 0x2b2d804...
Function Details [hide private]

setMinVerbosity(val)

source code 
Ensures that the log level is at least the given log level. Returns the log level before this call if a change was made otherwise None

Variables Details [hide private]

hdlr

Value:
ErrorCheckingHandler(sys.stderr)

fmtLogger

Value:
logging.getLogger(LOGGER_CONARY_FORMATTED)