From 3bb97a6dcccba52e7f54867e6fa8a2ebdc1dd669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 30 May 2018 13:14:25 +0200 Subject: [PATCH] Implement LogMonitoringEventHandler to manage a LogMonitor via API --- lib/tfw/components/__init__.py | 2 +- .../components/log_monitoring_event_handler.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 lib/tfw/components/log_monitoring_event_handler.py diff --git a/lib/tfw/components/__init__.py b/lib/tfw/components/__init__.py index dee92a1..12735f9 100644 --- a/lib/tfw/components/__init__.py +++ b/lib/tfw/components/__init__.py @@ -7,4 +7,4 @@ from .terminal_event_handler import TerminalEventHandler from .ide_event_handler import IdeEventHandler from .history_monitor import HistoryMonitor, BashMonitor, GDBMonitor from .terminal_commands import TerminalCommands -from .log_monitor import LogMonitor +from .log_monitoring_event_handler import LogMonitoringEventHandler diff --git a/lib/tfw/components/log_monitoring_event_handler.py b/lib/tfw/components/log_monitoring_event_handler.py new file mode 100644 index 0000000..8d354a8 --- /dev/null +++ b/lib/tfw/components/log_monitoring_event_handler.py @@ -0,0 +1,15 @@ +# Copyright (C) 2018 Avatao.com Innovative Learning Kft. +# All Rights Reserved. See LICENSE file for details. + + +from tfw import EventHandlerBase +from tfw.mixins import MonitorManagerMixin +from .log_monitor import LogMonitor + + +class LogMonitoringEventHandler(EventHandlerBase, MonitorManagerMixin): + def __init__(self, process_name, log_tail=0): + MonitorManagerMixin.__init__(self, LogMonitor, process_name, log_tail) + + def handle_event(self, message): + pass