twisted.python.logfile.DailyLogFile

Package twisted :: Package python :: Module logfile :: Class DailyLogFile |
[frames | no frames]

## Class DailyLogFile

    BaseLogFile --+
                  |
                 DailyLogFile

A log file that is rotated daily (at or after midnight localtime)

Method Summary
| `__getstate__(self)`
| ``__hook_orig_twisted_python_logfile_DailyLogFile_rotate__`(self)` Rotate the file and create a new one.
| ``__hook_orig_twisted_python_logfile_DailyLogFile_write__`(self, data)` Write some data to the log file
| ``_openFile`(self)` Open the log file.
| ``getLog`(self, identifier)` Given a unix time, return a LogReader for an old log file.
| `rotate(*args, **kw)`
| ``shouldRotate`(self)` Rotate when the date has changed since last write
| ``suffix`(self, tupledate)` Return the suffix given a (year, month, day) tuple or unixtime
| ``toDate`(self, *args)` Convert a unixtime to (year, month, day) localtime tuple, or return the current (year, month, day) localtime tuple.
| `write(*args, **kw)`
Inherited from BaseLogFile
| ``__init__`(self, name, directory, defaultMode)`
| ``__setstate__`(self, state)`
| ``close`(self)` Close the file.
| ``flush`(self)` Flush the file.
| ``getCurrentLog`(self)` Return a LogReader for the current log file.

Class Variable Summary
`list` | `__hook_post_twisted_python_logfile_DailyLogFile_rotate__` = `[<function _synchPost at 0x81d542c>]`
`list` | `__hook_post_twisted_python_logfile_DailyLogFile_write__` = `[<function _synchPost at 0x81d542c>]`
`list` | `__hook_pre_twisted_python_logfile_DailyLogFile_rotate__` = `[<function _synchPre at 0x823753c>]`
`list` | `__hook_pre_twisted_python_logfile_DailyLogFile_write__` = `[<function _synchPre at 0x823753c>]`
Inherited from BaseLogFile
`list` | `synchronized` = `['write', 'rotate']`

Method Details

### __hook_orig_twisted_python_logfile_DailyLogFile_rotate__(self) Rotate the file and create a new one. If it's not possible to open new logfile, this will fail silently, and continue logging to old logfile.

### __hook_orig_twisted_python_logfile_DailyLogFile_write__(self, data) Write some data to the log file Overrides: `twisted.python.logfile.BaseLogFile.write`

### _openFile(self) Open the log file. Overrides: `twisted.python.logfile.BaseLogFile._openFile` (inherited documentation)

### getLog(self, identifier) Given a unix time, return a LogReader for an old log file.

### shouldRotate(self) Rotate when the date has changed since last write Overrides: `twisted.python.logfile.BaseLogFile.shouldRotate`

### suffix(self, tupledate) Return the suffix given a (year, month, day) tuple or unixtime

### toDate(self, *args) Convert a unixtime to (year, month, day) localtime tuple, or return the current (year, month, day) localtime tuple. This function primarily exists so you may overload it with gmtime, or some cruft to make unit testing possible.

Class Variable Details

    ### __hook_post_twisted_python_logfile_DailyLogFile_rotate__ Type: `list` Value:
        [<function _synchPost at 0x81d542c>]

    ### __hook_post_twisted_python_logfile_DailyLogFile_write__ Type: `list` Value:
        [<function _synchPost at 0x81d542c>]

    ### __hook_pre_twisted_python_logfile_DailyLogFile_rotate__ Type: `list` Value:
        [<function _synchPre at 0x823753c>]

    ### __hook_pre_twisted_python_logfile_DailyLogFile_write__ Type: `list` Value:
        [<function _synchPre at 0x823753c>]

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