From 391f9028c619fd0ddceaf111142b54834b2dac4f Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 5 Sep 2019 12:06:28 +0200 Subject: [PATCH] another change in logging --- wo/core/logging.py | 6 +++--- wo/core/services.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wo/core/logging.py b/wo/core/logging.py index 54a3e8c..763ede4 100644 --- a/wo/core/logging.py +++ b/wo/core/logging.py @@ -51,7 +51,7 @@ class Log: Logs info messages with validation step """ print( - Log.OKBLUE + "{0:22}".format(msg) + + Log.OKBLUE + "{0:20}".format(msg) + " [" + Log.ENDC + ".." + Log.OKBLUE + "]" + Log.ENDC, end=end) if log: self.app.log.info(Log.OKBLUE + msg + Log.ENDC) @@ -61,7 +61,7 @@ class Log: Logs info messages after validation step """ print( - Log.OKBLUE + "{0:22}".format(msg) + + Log.OKBLUE + ("{0:20}".format(msg)) + " [" + Log.ENDC + Log.OKGREEN + "OK" + Log.ENDC + Log.OKBLUE + "]" + Log.ENDC, end=end) if log: @@ -72,7 +72,7 @@ class Log: Logs info messages after validation step """ print( - Log.OKBLUE + "{0:22}".format(msg) + + Log.OKBLUE + "{0:20}".format(msg) + " [" + Log.ENDC + Log.FAIL + "OK" + Log.ENDC + Log.OKBLUE + "]" + Log.ENDC, end=end) if log: diff --git a/wo/core/services.py b/wo/core/services.py index 70ac857..dc874b2 100644 --- a/wo/core/services.py +++ b/wo/core/services.py @@ -38,7 +38,8 @@ class WOService(): Log.info(self, "Start : {0:10}" .format(service_name), end='') retcode = subprocess.getstatusoutput(service_cmd) if retcode[0] == 0: - Log.info(self, "[" + Log.ENDC + "OK" + Log.OKBLUE + "]") + Log.info(self, "[" + Log.ENDC + Log.OKGREEN + + "OK" + Log.ENDC + Log.OKBLUE + "]") return True else: Log.debug(self, "{0}".format(retcode[1])) @@ -55,7 +56,7 @@ class WOService(): Similar to `service xyz stop` """ try: - Log.info(self, "Stop : {0:10}" .format(service_name), end='') + Log.info(self, "Stop : {0:10}" .format(service_name), end='') retcode = subprocess.getstatusoutput('service {0} stop' .format(service_name)) if retcode[0] == 0: