Module t.p.log

Part of twisted.python View Source

Logging and metrics infrastructure.
Class ILogContext Actually, this interface is just a synoym for the dictionary interface,
Function callWithContext Undocumented
Function callWithLogger Utility method which wraps a function in a try:/except:, logs a failure if
Function showwarning Undocumented
Function startKeepingErrors DEPRECATED in Twisted 2.5.
Function flushErrors DEPRECATED in Twisted 2.5. See TestCase.flushLoggedErrors.
Function _flushErrors PRIVATE. DEPRECATED. DON'T USE.
Function ignoreErrors DEPRECATED
Function _ignore PRIVATE. DEPRECATED. DON'T USE.
Function clearIgnores DEPRECATED
Function _clearIgnores PRIVATE. DEPRECATED. DON'T USE.
Function err Write a failure to the log.
Class Logger This represents a class which may 'own' a log. Used by subclassing.
Class LogPublisher Class for singleton log message publishing.
Class FileLogObserver Log observer that writes to a file-like object.
Class StdioOnnaStick Class that pretends to be stout/err.
Function startLogging Initialize logging to a specified file.
Function startLoggingWithObserver Initialize logging to a specified observer. If setStdout is true
Class NullFile Undocumented
Function discardLogs Throw away all logs.
Class DefaultObserver Default observer.
def callWithContext(ctx, func, *args, **kw): (source)
Undocumented
def callWithLogger(logger, func, *args, **kw): (source)
Utility method which wraps a function in a try:/except:, logs a failure if one occurrs, and uses the system's logPrefix.
def showwarning(message, category, filename, lineno, file=None): (source)
Undocumented
def startKeepingErrors(): (source)

DEPRECATED in Twisted 2.5.

Support function for testing frameworks.

Start keeping errors in a buffer which can be retrieved (and emptied) with flushErrors.
def flushErrors(*errorTypes): (source)

DEPRECATED in Twisted 2.5. See TestCase.flushLoggedErrors.

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.)
def _flushErrors(*errorTypes): (source)
PRIVATE. DEPRECATED. DON'T USE.
def ignoreErrors(*types): (source)
DEPRECATED
def _ignore(*types): (source)
PRIVATE. DEPRECATED. DON'T USE.
def clearIgnores(): (source)
DEPRECATED
def _clearIgnores(): (source)
PRIVATE. DEPRECATED. DON'T USE.
def err(_stuff=None, _why=None, **kw): (source)
Write a failure to the log.
def startLogging(file, *a, **kw): (source)
Initialize logging to a specified file.
def startLoggingWithObserver(observer, setStdout=1): (source)
Initialize logging to a specified observer. If setStdout is true (defaults to yes), also redirect sys.stdout and sys.stderr to the specified file.
def discardLogs(): (source)
Throw away all logs.
API Documentation for twisted, generated by pydoctor.