commit 0682f8bd29ff93292ff9c4a7fc0b5efcff37757f
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Apr 12 12:20:04 2013 +0200
NetTestSlave: change log message handling
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 files 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"
Show replies by date