Adjust date output format
This commit is contained in:
parent
3a2478ee0c
commit
982dfd52c6
|
@ -96,7 +96,7 @@ class Logger(object):
|
||||||
|
|
||||||
# Get the date
|
# Get the date
|
||||||
if self.config['log_dates']:
|
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:
|
else:
|
||||||
date = ''
|
date = ''
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ class ZookeeperLogger(Thread):
|
||||||
logs = deque(self.zkhandler.read(('logs.messages', self.node)).split('\n'), self.max_lines)
|
logs = deque(self.zkhandler.read(('logs.messages', self.node)).split('\n'), self.max_lines)
|
||||||
if not self.config['log_dates']:
|
if not self.config['log_dates']:
|
||||||
# We want to log dates here, even if the log_dates config is not set
|
# 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:
|
else:
|
||||||
date = ''
|
date = ''
|
||||||
logs.append(f'{date}{message}')
|
logs.append(f'{date}{message}')
|
||||||
|
|
Loading…
Reference in New Issue