Package twisted :: Package python :: Module log
[show private | hide private]
[frames | no frames]

Module twisted.python.log

Logging and metrics infrastructure.
Classes
DefaultObserver Default observer.
EscapeFromTheMeaninglessConfinesOfCapital  
FileLogObserver Log observer that writes to a file-like object.
ILogContext Actually, this interface is just a synoym for the dictionary interface, but it serves as a key for the default information in a log.
Logger This represents a class which may 'own' a log.
LogPublisher Class for singleton log message publishing.
NullFile  
StdioOnnaStick Class that pretends to be stout/err.

Function Summary
  callWithContext(ctx, func, *args, **kw)
  callWithLogger(logger, func, *args, **kw)
Utility method which wraps a function in a try:/except:, logs a failure if one occurrs, and uses the system's logPrefix.
  clearIgnores()
  debug(*stuff, **otherstuff)
Write some data to the log, indented, so it's easier to distinguish from 'normal' output.
  deferr(_stuff, **kw)
Write a failure to the log.
  discardLogs()
Throw away all logs.
  err(_stuff, **kw)
Write a failure to the log.
  flushErrors(*errorTypes)
Support function for testing frameworks.
  ignoreErrors(*types)
  initThreads()
  showwarning(message, category, filename, lineno, file)
  startKeepingErrors()
Support function for testing frameworks.
  startLogging(file, setStdout)
Initialize logging to a specified file.
  write(stuff)
Write some data to the log.

Variable Summary
dict __warningregistry__
instance method addObserver
DefaultObserver defaultObserver
StdioOnnaStick logerr
StdioOnnaStick logfile
EscapeFromTheMeaninglessConfinesOfCapital logOwner
instance method msg
instance method removeObserver
LogPublisher theLogPublisher
list _ignoreErrors
int _keepErrors
list _keptErrors
NoneType _oldshowwarning

Function Details

callWithLogger(logger, func, *args, **kw)

Utility method which wraps a function in a try:/except:, logs a failure if one occurrs, and uses the system's logPrefix.

debug(*stuff, **otherstuff)

Write some data to the log, indented, so it's easier to distinguish from 'normal' output.

deferr(_stuff=None, **kw)

Write a failure to the log.

discardLogs()

Throw away all logs.

err(_stuff=None, **kw)

Write a failure to the log.

flushErrors(*errorTypes)

Support function for testing frameworks.

Return a list of errors that occurred since the last call to flushErrors(). (This will return None unless startKeepingErrors has been called.)

startKeepingErrors()

Support function for testing frameworks.

Start keeping errors in a buffer which can be retrieved (and emptied) with flushErrors.

startLogging(file, setStdout=1)

Initialize logging to a specified file.

write(stuff)

Write some data to the log.

Variable Details

__warningregistry__

Type:
dict
Value:
{('What the hell is wrong with you?', <class exceptions.DeprecationWar\
ning at 0x810d7bc>, 70): 1}                                            

addObserver

addObserver = twisted.python.log.LogPublisher.addObserver

defaultObserver

Type:
DefaultObserver
Value:
<twisted.python.log.DefaultObserver instance at 0x824938c>             

logerr

Type:
StdioOnnaStick
Value:
<twisted.python.log.StdioOnnaStick instance at 0x81d65bc>              

logfile

Type:
StdioOnnaStick
Value:
<twisted.python.log.StdioOnnaStick instance at 0x81d6594>              

logOwner

Type:
EscapeFromTheMeaninglessConfinesOfCapital
Value:
<twisted.python.log.EscapeFromTheMeaninglessConfinesOfCapital instance\
 at 0x81f2f4c>                                                         

msg

msg = twisted.python.log.LogPublisher.msg

removeObserver

removeObserver = twisted.python.log.LogPublisher.removeObserver

theLogPublisher

Type:
LogPublisher
Value:
<twisted.python.log.LogPublisher instance at 0x819ee4c>                

_ignoreErrors

Type:
list
Value:
[]                                                                     

_keepErrors

Type:
int
Value:
0                                                                      

_keptErrors

Type:
list
Value:
[]                                                                     

_oldshowwarning

Type:
NoneType
Value:
None                                                                   

Generated by Epydoc 1.1 on Thu May 8 13:18:56 2003 http://epydoc.sf.net