From 2029e5d52299e67c6a782f23e9c67159c7113ee0 Mon Sep 17 00:00:00 2001 From: Krateng Date: Sat, 14 Dec 2019 16:18:20 +0100 Subject: [PATCH] Added log output when starting server via controller --- maloja/controller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/maloja/controller.py b/maloja/controller.py index 7467e22..98b8f82 100755 --- a/maloja/controller.py +++ b/maloja/controller.py @@ -107,8 +107,9 @@ def getInstanceSupervisor(): def start(): setup() try: - p = subprocess.Popen(["python3","-m","maloja.server"],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,cwd=DATA_DIR) - sp = subprocess.Popen(["python3","-m","maloja.supervisor"],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,cwd=DATA_DIR) + with open("logs/stderr.log","w") as logf: + p = subprocess.Popen(["python3","-m","maloja.server"],stdout=subprocess.DEVNULL,stderr=logf,cwd=DATA_DIR) + sp = subprocess.Popen(["python3","-m","maloja.supervisor"],stdout=subprocess.DEVNULL,stderr=logf,cwd=DATA_DIR) print(col["green"]("Maloja started!") + " PID: " + str(p.pid)) from doreah import settings