diff --git a/solvable/src/event_handler_main.py b/solvable/src/event_handler_main.py index 1ff27f1..bdcc746 100644 --- a/solvable/src/event_handler_main.py +++ b/solvable/src/event_handler_main.py @@ -3,7 +3,7 @@ from ast import literal_eval from tornado.ioloop import IOLoop from tfw.components import IdeEventHandler, TerminalEventHandler, ProcessManagingEventHandler, BashMonitor -from tfw.components import TerminalCommands +from tfw.components import TerminalCommands, LogMonitor from tfw.networking import MessageSender, TFWServerConnector from tfw.config import TFWENV from tfw.config.logs import logging @@ -74,14 +74,16 @@ if __name__ == '__main__': directory=TFWENV.IDE_WD, exclude=['*.pyc'], additional_watched_directories=[TFWENV.WEBSERVICE_DIR] ) - terminal = TerminalEventHandler( # Web shell backend + terminal = TerminalEventHandler( # Web shell backend key='shell', monitor=BashMonitor(TFWENV.HISTFILE) ) - processmanager = ProcessManagingEventHandler( # Handles 'deploy' button clicks + processmanager = ProcessManagingEventHandler( # Handles 'deploy' button clicks key='processmanager', - dirmonitor=ide.monitor + dirmonitor=ide.monitor, + log_tail=2000 ) + LogMonitor('webservice', log_tail=2000).watch() # Sends live logs of webservice process to frontend terminal.historymonitor.subscribe_callback(cenator)