From 982dfd52c6f11abad8b6e78d191c79b6f8b3e240 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 18 Jul 2021 19:00:54 -0400 Subject: [PATCH] Adjust date output format --- daemon-common/log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon-common/log.py b/daemon-common/log.py index dc856b94..6cb34f26 100644 --- a/daemon-common/log.py +++ b/daemon-common/log.py @@ -96,7 +96,7 @@ class Logger(object): # Get the date if self.config['log_dates']: - date = '{} - '.format(datetime.now().strftime('%Y/%m/%d %H:%M:%S.%f')) + date = '{} '.format(datetime.now().strftime('%Y/%m/%d %H:%M:%S.%f')) else: date = '' @@ -177,7 +177,7 @@ class ZookeeperLogger(Thread): logs = deque(self.zkhandler.read(('logs.messages', self.node)).split('\n'), self.max_lines) if not self.config['log_dates']: # We want to log dates here, even if the log_dates config is not set - date = '{} - '.format(datetime.now().strftime('%Y/%m/%d %H:%M:%S.%f')) + date = '{} '.format(datetime.now().strftime('%Y/%m/%d %H:%M:%S.%f')) else: date = '' logs.append(f'{date}{message}')