class documentation
class BaseLogFile: (source)
Known subclasses: twisted.python.logfile.DailyLogFile
, twisted.python.logfile.LogFile
Constructor: BaseLogFile(name, directory, defaultMode)
The base class for a log file that can be rotated.
Class Method | from |
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 | get |
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. |
Method | should |
Override with a method to that returns true if the log should be rotated. |
Method | write |
Write some data to the file. |
Class Variable | synchronized |
Undocumented |
Instance Variable | closed |
Undocumented |
Instance Variable | default |
Undocumented |
Instance Variable | directory |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | path |
Undocumented |
Method | _open |
Open the log file. |
Instance Variable | _file |
Undocumented |
Reopen the log file. This is mainly useful if you use an external log rotation tool, which moves under your feet.
Note that on Windows you probably need a specific API to rename the file, as it's not supported to simply use os.rename, for example.