stop printing date to systemd log

This commit is contained in:
Izalia Mae 2020-02-26 14:24:01 -05:00
parent e1756fe901
commit 70719fd091
2 changed files with 7 additions and 3 deletions

View file

@ -49,8 +49,12 @@ class Log():
if levelNum < self.minimum:
return
date = datetime.now().strftime(self.datefmt)
output = f'{date} {level}: {msg}\n'
output = f'{level}: {msg}\n'
# Only show date when not running in systemd
if not env.get('INVOCATION_ID'):
date = datetime.now().strftime(self.datefmt)
output = f'{date} {output}'
stdout = sys.stdout
stdout.write(output)

View file

@ -89,7 +89,7 @@ def build_templates():
elif base not in times or times.get(base) != modtime:
updated = True
logging.info(f"Template '{filename}' was changed. Building...")
logging.verbose(f"Template '{filename}' was changed. Building...")
try:
template = f'{script_path}/frontend/templates/{filename}'