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

Module twisted.python.log

twisted.log: Logfile and multi-threaded file support.
Classes
Log This will create a Log file (intended to be written to with 'print', but usable from anywhere that a file is) from a file.
Logger This represents a class which may 'own' a log.
LogOwner Allow object to register themselves as owners of the log.
NullFile  
Output This represents a class which traps output.
ThreadedLogOwner Allow object to register themselves as owners of the log, per thread.

Function Summary
  startLogging(file, setStdout)
Initialize logging to a specified file.
  msg(*stuff)
  write(stuff)
Write some data to the log.
  clearIgnores()
  debug(*stuff)
Write some data to the log, indented, so it's easier to distinguish from 'normal' output.
  deferr()
Write the default failure (the current exception) to the log.
  discardLogs()
Throw away all logs.
  err(stuff)
Write a failure to the log.
  flushErrors(*errorTypes)
Support function for testing frameworks.
  ignoreErrors(*types)
  indent(s)
  initThreads()
  msg(*stuff)
  output(func, *args, **kw)
  real_msg(*stuff)
Write some data to the log (a linebreak will be appended).
  showwarning(message, category, filename, lineno, file)
  startKeepingErrors()
Support function for testing frameworks.
  _log_output(func, *args, **kw)
  _no_log_output(func, *args, **kw)

Variable Summary
ThreadedLogOwner logOwner
list file_protocol
Log logerr
Log logfile
lock loglock
list _ignoreErrors
int _keepErrors
list _keptErrors

Function Details

debug(*stuff)

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

deferr()

Write the default failure (the current exception) to the log.

discardLogs()

Throw away all logs.

err(stuff)

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.)

real_msg(*stuff)

Write some data to the log (a linebreak will be appended).

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

file_protocol

Type:
list
Value:
['close',
 'closed',
 'fileno',
 'flush',
 'mode',
 'name',
 'read',
 'readline',
...                                                                    

logerr

Type:
Log
Value:
<twisted.python.log.Log instance at 0x109e3638>                        

logfile

Type:
Log
Value:
<twisted.python.log.Log instance at 0x109e3638>                        

loglock

Type:
lock
Value:
<thread.lock object at 0x102d75c8>                                     

logOwner

Type:
ThreadedLogOwner
Value:
<twisted.python.log.ThreadedLogOwner instance at 0x10419e58>           

_ignoreErrors

Type:
list
Value:
[]                                                                     

_keepErrors

Type:
int
Value:
1                                                                      

_keptErrors

Type:
list
Value:
[]                                                                     

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:28:36 2003 http://epydoc.sf.net