Package twisted :: Package python :: Module log
[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, *a, **kw)
Initialize logging to a specified file.
  startLoggingWithObserver(observer, setStdout)
Initialize logging to a specified observer.
  write(stuff)
Write some data to the log.

Variable Summary
list _ignoreErrors = []
int _keepErrors = 0                                                                     
list _keptErrors = []
EscapeFromTheMeaninglessConfinesOfCapital logOwner = <twisted.python.log.EscapeFromTheMeaninglessC...

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, *a, **kw)

Initialize logging to a specified file.

startLoggingWithObserver(observer, setStdout=1)

Initialize logging to a specified observer. If setStdout is true (defaults to yes), also redirect sys.stdout and sys.stderr to the specified file.

write(stuff)

Write some data to the log. DEPRECATED. Use msg instead.

Variable Details

_ignoreErrors

Type:
list
Value:
[]                                                                     

_keepErrors

Type:
int
Value:
0                                                                     

_keptErrors

Type:
list
Value:
[]                                                                     

logOwner

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

Generated by Epydoc 2.0 on Sat May 15 20:08:19 2004 http://epydoc.sf.net