From c003a1b078050e5134ef5519a3f34149eb6471f1 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 11 Mar 2018 01:26:40 +0100 Subject: [PATCH] Add localtime also to early log messages Signed-off-by: Clifford Wolf --- sbysrc/sby.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index 1a24841..e77c571 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -20,6 +20,7 @@ import os, sys, getopt, shutil, tempfile ##yosys-sys-path## from sby_core import SbyJob +from time import localtime sbyfile = None workdir = None @@ -101,7 +102,8 @@ if len(args) > 1: early_logmsgs = list() def early_log(workdir, msg): - early_logmsgs.append("SBY [%s] %s" % (workdir, msg)) + tm = localtime() + early_logmsgs.append("SBY %2d:%02d:%02d [%s] %s" % (tm.tm_hour, tm.tm_min, tm.tm_sec, workdir, msg)) print(early_logmsgs[-1]) -- 2.30.2