From: Ondrej Lichtner <olichtne(a)redhat.com>
The server process now handles the logs from the commands by directing
them to its root logger which will result in the log message being
written on the tty, the log file and sent to the controller.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetTestSlave.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index be85da4..5e71ba1 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -396,9 +396,9 @@ class NetTestSlave:
self._cmd_context.cleanup()
self._log_ctl.cancel_connection()
elif msg["type"] == "log":
- if not self._server_handler.send_data_to_ctl(msg):
- self._cmd_context.cleanup()
- self._log_ctl.cancel_connection()
+ logger = logging.getLogger()
+ record = logging.makeLogRecord(msg["record"])
+ logger.handle(record)
elif msg["type"] == "exception":
if msg["cmd_id"] != None:
logging.debug("Recieved an exception from command with id: %s"
--
1.7.11.7