diff --git a/gui/obsw_backend_test.py b/gui/obsw_backend_test.py index eff323c4262b95a792f3598359d6ec7646422f80..9ea2bfbfe8542bee214306aeaf9c2f589a9ceec3 100644 --- a/gui/obsw_backend_test.py +++ b/gui/obsw_backend_test.py @@ -1,8 +1,11 @@ from multiprocessing.connection import Listener from multiprocessing import Process +from utility.obsw_logger import get_logger import logging +LOGGER = get_logger() + class TmTcBackend(Process): def __init__(self): from obsw_tmtc_client import TmTcHandler @@ -17,13 +20,13 @@ class TmTcBackend(Process): def listen(self): self.conn = self.listener.accept() - print('connection accepted from' + str(self.listener.last_accepted)) + LOGGER.info("TmTcBackend: Connection accepted from %s",str(self.listener.last_accepted)) while True: msg = self.conn.recv() # do something with msg # here, the core client could be called to perform operations based on received message if msg == 'test': - print("Hallo Welt !") + LOGGER.info("TmTcBackend: Hallo Welt !") elif msg == 'close': try: self.conn.close() diff --git a/gui/obsw_tmtc_gui.py b/gui/obsw_tmtc_gui.py index 639dae2d98426070502d48d1cbcf3b151182f763..f564b36b95d99931abbbde431a1854695cd4d42a 100644 --- a/gui/obsw_tmtc_gui.py +++ b/gui/obsw_tmtc_gui.py @@ -45,6 +45,7 @@ class TmTcGUI(Process): self.root = tk.Tk() self.root.title("Hallo Welt") while True: + LOGGER.info("TmTcGUI: Sending test message") self.conn.send("test") self.root.update() time.sleep(0.1)