spug.util.log
index
/home/mmuller/w/spug/util/log.py

Simple logger interface that will grow to suit my needs.

 
Modules
       
os
sys
syslog

 
Classes
       
util.log.LogWriter
util.log.StreamLogWriter
util.log.SyslogLogger

 
class LogWriter
    Interface for classes wishing to implement a "logging destination" - a
place to write to.
 
  Methods defined here:
debug(self, msg, *args, **kwargs)
Logs a debug message.  Must be implemented by derived classes.
error(self, msg, *args, **kwargs)
Logs an error message.  Must be implemented by derived classes.
info(self, msg, *args, **kwargs)
Logs a info message.  Must be implemented by derived classes.
notice(self, msg, *args, **kwargs)
Logs a notice message.  Must be implemented by derived classes.

 
class StreamLogWriter(LogWriter)
    Implements a @LogWriter on top of a standard python stream (aka file
interface).
 
  Methods defined here:
__init__(self, out)
debug(self, msg, *args, **kwargs)
error(self, msg, *args, **kwargs)
info(self, msg, *args, **kwargs)
notice(self, msg, *args, **kwargs)

 
class SyslogLogger(LogWriter)
    Implements @LogWriter on top of syslog.
 
  Methods defined here:
__init__(self, ident='syslog', logopt=0, facility=8)
critical(self, msg, *args, **kwargs)
debug(self, msg, *args, **kwargs)
error(self, msg, *args, **kwargs)
info(self, msg, *args, **kwargs)
notice(self, msg, *args, **kwargs)

 
Functions
       
critical(msg, *args, **kwargs)
debug(msg, *args, **kwargs)
error(msg, *args, **kwargs)
info(msg, *args, **kwargs)
notice(msg, *args, **kwargs)
setLogWriter(logger)
Sets the default, application-wide log writer.
 
parms:
   logger::
      [@LogWriter]
warn(msg, *args, **kwargs)

 
Data
        ALERT = 1
CRIT = 2
DEBUG = 7
EMERG = 0
ERR = 3
INFO = 6
NOTICE = 5
WARN = 4
WARNING = 4