class platypush.backend.log.http.LogEventHandler(*args: Any, **kwargs: Any)[source]
class FileResource(path: str, pos: int = 0, lock: <function RLock at 0x7f13d6d4e820> = <unlocked _thread.RLock object owner=0 count=0 at 0x7f13d0e59f00>, last_timestamp: Optional[datetime.datetime] = None)[source]
__init__(path: str, pos: int = 0, lock: threading.RLock = <unlocked _thread.RLock object owner=0 count=0>, last_timestamp: Optional[datetime.datetime] = None) None
last_timestamp: Optional[datetime.datetime] = None
lock: threading.RLock = <unlocked _thread.RLock object owner=0 count=0>
__init__(*args, monitored_files: Optional[Iterable[str]] = None, **kwargs)[source]
class platypush.backend.log.http.LogHttpBackend(log_files: List[str], **kwargs)[source]

This backend can be used to monitor one or more HTTP log files (tested on Apache and Nginx) and trigger events whenever a new log line is added.



  • watchdog (pip install watchdog)

__init__(log_files: List[str], **kwargs)[source]

log_files – List of log files to be monitored.