Package flumotion :: Package common :: Module log :: Class Loggable
[show private | hide private]
[frames | no frames]

Class Loggable

Known Subclasses:
Authenticator, Avatar, BaseAdminGtk, BaseAdminGtkNode, BaseAdminText, BaseComponent, BouncerPortal, BundleLoader, ComponentRegistry, ConfigEntryComponent, CryptChecker, DAG, DepGraph, Effect, FDPassingBroker, FeedClientFactory, FlexibleCredentialsChecker, FluLogObserver, FPBClientFactory, HTTPAuthentication, Issuer, JobAvatar, JobClientBroker, JobClientFactory, JobHeaven, Kindergarten, ManagerAvatar, ManagerHeaven, MultiAdminModel, Packager, Parser, PortSet, ProxyManagerBouncer, ReconnectingPBClientFactory, Referenceable, RTSPRequest, RTSPResource, Server, Servicer, Sha256Checker, Translator, Vishnu, WorkerBrain, WorkerConfigXML

Base class for objects that want to be able to log messages with different level of severity. The levels are, in order from least to most: log, debug, info, warning, error.
Method Summary
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
str logCategory: Implementors can provide a category to log their messages under.

Method Details

debug(self, *args)

Log a debug message. Used for debugging.

doLog(self, level, where, format, *args, **kwargs)

Log a message at the given level, with the possibility of going higher up in the stack.
Parameters:
level - log level
           (type=int)
where - how many frames to go back from the last log frame; or a function (to log for a future call)
           (type=int (negative), or function)
kwargs - a dict of pre-calculated values from a previous doLog call
Returns:
a dict of calculated variables, to be reused in a call to doLog that should show the same location
           (type=dict)

error(self, *args)

Log an error. By default this will also raise an exception.

info(self, *args)

Log an informational message. Used for normal operation.

log(self, *args)

Log a log message. Used for debugging recurring events.

logFunction(self, *args)

Overridable log function. Default just returns passed message.

logObjectName(self)

Overridable object name function.

warning(self, *args)

Log a warning. Used for non-fatal problems.

warningFailure(self, failure, swallow=True)

Log a warning about a Failure. Useful as an errback handler: d.addErrback(self.warningFailure)
Parameters:
swallow - whether to swallow the failure or not
           (type=bool)

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy flumotion.common.log.Loggable>                          

__providedBy__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x2b41a200f550>   

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x2b41a200f550>   

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'default'                                                              

Generated by Epydoc 2.1 on Fri Apr 6 10:13:42 2007 http://epydoc.sf.net