From 2228c3bcc359889c70cc5d31b947b8e9497bc963 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 12 Dec 2019 18:20:22 +1100 Subject: [PATCH] Remove timestamp prefixes from logfile We already put them in a timestamped directory. There's not much point in repeating it on the individual log files and as the logs are rotated the timestamps drift which makes then annoying to tab complete. If someone really wants to keep the timestamps then we could change the prefix to a suffix I guess. Signed-off-by: Oliver O'Halloran --- OpTestConfiguration.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OpTestConfiguration.py b/OpTestConfiguration.py index 86055eed3..ca8743fd4 100644 --- a/OpTestConfiguration.py +++ b/OpTestConfiguration.py @@ -561,7 +561,7 @@ def parse_args(self, argv=None): self.outsuffix = self.get_suffix() # set up where all the logs go - logfile = os.path.join(self.output, "%s.log" % self.outsuffix) + logfile = os.path.join(self.output, "host-console.log") logcmd = "tee %s" % (logfile) # we use 'cat -v' to convert control characters @@ -577,10 +577,9 @@ def parse_args(self, argv=None): OpTestLogger.optest_logger_glob.sh_level = logging.INFO OpTestLogger.optest_logger_glob.sh.setLevel(logging.INFO) - OpTestLogger.optest_logger_glob.setUpLoggerFile( - datetime.utcnow().strftime("%Y%m%d%H%M%S%f")+'.main.log') - OpTestLogger.optest_logger_glob.setUpLoggerDebugFile( - datetime.utcnow().strftime("%Y%m%d%H%M%S%f")+'.debug.log') + OpTestLogger.optest_logger_glob.setUpLoggerFile('main.log') + OpTestLogger.optest_logger_glob.setUpLoggerDebugFile('debug.log') + OpTestLogger.optest_logger_glob.optest_logger.info( 'TestCase Log files: {}/*'.format(self.output)) OpTestLogger.optest_logger_glob.optest_logger.info(