log.http

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

Bases: EventHandler

class FileResource(path: str, pos: int = 0, lock: <function RLock at 0x7ff1b5fbfd00> = <unlocked _thread.RLock object owner=0 count=0 at 0x7ff1ab7f5140>, 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: ~typing.Optional[~datetime.datetime] = None) None
__init__(*args, monitored_files: Optional[Iterable[str]] = 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.

Triggers:

Requires:

  • watchdog (pip install watchdog)

class EventHandlerFactory[source]

Bases: object

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

log_files – List of log files to be monitored.