class platypush.backend.log.http.LogEventHandler(*args: Any, **kwargs: Any)[source]#

Bases: EventHandler

class FileResource(path: str, pos: int = 0, lock: <function RLock at 0x7fde4e260900> = <unlocked _thread.RLock object owner=0 count=0 at 0x7fde47829740>, last_timestamp: Optional[datetime.datetime] = None)[source]#

Bases: object

__init__(path: str, pos: int = 0, lock: ~threading.RLock = <unlocked _thread.RLock object owner=0 count=0>, last_timestamp: ~datetime.datetime | None = None) None#
__init__(*args, monitored_files: Iterable[str] | None = None, **kwargs)[source]#
class platypush.backend.log.http.LogHttpBackend(log_files: List[str], **kwargs)[source]#

Bases: FileMonitorBackend

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)

class EventHandlerFactory[source]#

Bases: object

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

log_files – List of log files to be monitored.