class documentation

class FileLogObserver: (source)

Constructor: FileLogObserver(outFile, formatEvent)

Implements interfaces: twisted.logger.ILogObserver

View In Hierarchy

Log observer that writes to a file-like object.

Method __call__ Write event to file.
Method __init__ No summary
Instance Variable formatEvent Undocumented
Instance Variable _encoding Undocumented
Instance Variable _outFile Undocumented
def __call__(self, event: LogEvent): (source)

Write event to file.

Parameters
event:LogEventAn event.
def __init__(self, outFile: IO[Any], formatEvent: Callable[[LogEvent], Optional[str]]): (source)
Parameters
outFile:IO[Any]A file-like object. Ideally one should be passed which accepts text data. Otherwise, UTF-8 bytes will be used.
formatEvent:Callable[[LogEvent], Optional[str]]A callable that formats an event.
formatEvent = (source)

Undocumented

Undocumented

_outFile = (source)

Undocumented