Table of Contents

Class: LogFile Twisted-0.19.0/twisted/python/logfile.py

A log file that can be rotated.

Methods   
__getstate__
__init__
__setstate__
_openFile
close
flush
getCurrentLog
getLog
listLogs
rotate
write
  __getstate__ 
__getstate__ ( self )

  __init__ 
__init__ (
        self,
        name,
        directory,
        rotateLength=1000000,
        )

  __setstate__ 
__setstate__ ( self,  state )

  _openFile 
_openFile ( self )

Open the log file.

  close 
close ( self )

Close the file.

The file cannot be used once it has been closed.

  flush 
flush ( self )

Flush the file.

  getCurrentLog 
getCurrentLog ( self )

Return a LogReader for the current log file.

  getLog 
getLog ( self,  identifier )

Given an integer, return a LogReader for an old log file.

Exceptions   
ValueError, "no such logfile exists"
  listLogs 
listLogs ( self )

Return sorted list of integers - the old logs' identifiers.

  rotate 
rotate ( self )

Rotate the file and create a new one.

  write 
write ( self,  data )

Write some data to the file.


Table of Contents

This document was automatically generated on Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0