From 616d1ab5e300ce2c1c2e049f1513ef79df0fb8d0 Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Thu, 17 Sep 2020 15:15:15 +1000 Subject: [PATCH] log ctrl master startup --- runserver/__main__.py | 3 ++- tes/sshwrapper/__init__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runserver/__main__.py b/runserver/__main__.py index ac16d16..8d5d36b 100644 --- a/runserver/__main__.py +++ b/runserver/__main__.py @@ -31,7 +31,8 @@ def stopThreads(signum,frame,event,old_handler): def main(): import logging import signal - logging.basicConfig(filename="tes.log",format="%(asctime)s %(levelname)s:%(process)s: %(message)s") + FORMAT = "[%(asctime)s %(levelname)s:%(process)s %(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s" + logging.basicConfig(filename="tes.log",format=FORMAT) logger=logging.getLogger() logger.setLevel(logging.DEBUG) old_handler = signal.getsignal(signal.SIGINT) diff --git a/tes/sshwrapper/__init__.py b/tes/sshwrapper/__init__.py index 06acddb..8334162 100644 --- a/tes/sshwrapper/__init__.py +++ b/tes/sshwrapper/__init__.py @@ -150,7 +150,8 @@ class Ssh: #logger.debug("master spawned, attempt communicate") #stdout, stderr = ctrl_p.communicate() #logger.debug('communicate on the control port complete') - sess.pids.append(ctrl_p.pid) + logger.debug("spanwed ssh mux with pid {}".format(ctrl_p.pid)) + #sess.pids.append(ctrl_p.pid) sess.ctrl_processes[ctrlsocket] = ctrl_p try: mode = os.stat(ctrlsocket).st_mode -- GitLab