Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`python`.`logfile`.`DailyLogFile``

class documentation

`class DailyLogFile(BaseLogFile): (source)`

View In Hierarchy

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

Method | `__getstate__` | Undocumented
Method | `getLog` | Given a unix time, return a LogReader for an old log file.
Method | `rotate` | Rotate the file and create a new one.
Method | `shouldRotate` | Rotate when the date has changed since last write
Method | `suffix` | Return the suffix given a (year, month, day) tuple or unixtime
Method | `toDate` | Convert a unixtime to (year, month, day) localtime tuple, or return the current (year, month, day) localtime tuple.
Method | `write` | Write some data to the log file
Instance Variable | `lastDate` | Undocumented
Method | `_openFile` | Open the log file.

Inherited from `BaseLogFile`:

Class Method | `fromFullPath` | Construct a log file from a full file path.
Method | `__init__` | Create a log file.
Method | `close` | Close the file.
Method | `flush` | Flush the file.
Method | `getCurrentLog` | Return a LogReader for the current log file.
Method | `reopen` | Reopen the log file. This is mainly useful if you use an external log rotation tool, which moves under your feet.
Class Variable | `synchronized` | Undocumented
Instance Variable | `closed` | Undocumented
Instance Variable | `defaultMode` | Undocumented
Instance Variable | `directory` | Undocumented
Instance Variable | `name` | Undocumented
Instance Variable | `path` | Undocumented
Instance Variable | `_file` | Undocumented

def __getstate__(self): (source)

Undocumented

def getLog(self, identifier): (source)

Given a unix time, return a LogReader for an old log file.

def rotate(self): (source)

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.

def shouldRotate(self): (source)
overrides `twisted.python.logfile.BaseLogFile.shouldRotate`

Rotate when the date has changed since last write

def suffix(self, tupledate): (source)

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

def toDate(self, *args): (source)

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.

def write(self, data): (source)
overrides `twisted.python.logfile.BaseLogFile.write`

Write some data to the log file

lastDate = (source)

Undocumented

def _openFile(self): (source)
overrides `twisted.python.logfile.BaseLogFile._openFile`

Open the log file.

The log file is always opened in binary mode.