summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-19 16:01:33 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-20 16:05:28 +0100
commitbafcff95e2b5e0b9a8c76ce46a62667bf6f49b00 (patch)
tree3cea4c8f677d31e5bfa28e16b7e9def6888b46d7 /scripts
parentc39b072fa7e96f385da338a727c67e607308d637 (diff)
downloadopenembedded-core-bafcff95e2b5e0b9a8c76ce46a62667bf6f49b00.tar.gz
openembedded-core-bafcff95e2b5e0b9a8c76ce46a62667bf6f49b00.tar.bz2
openembedded-core-bafcff95e2b5e0b9a8c76ce46a62667bf6f49b00.zip
oe-build-perf-test: align log message format with testrunner output
The previous attempt on this was a bit erroneous, dropping time stamps completely although only the timestamp format should've been changed. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-build-perf-test6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test
index 9f3ba44366..88af40ab76 100755
--- a/scripts/oe-build-perf-test
+++ b/scripts/oe-build-perf-test
@@ -34,7 +34,9 @@ from oeqa.utils.commands import runCmd
# Set-up logging
-logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
+LOG_FORMAT = '[%(asctime)s] %(levelname)s: %(message)s'
+logging.basicConfig(level=logging.INFO, format=LOG_FORMAT,
+ datefmt='%Y-%m-%d %H:%M:%S')
log = logging.getLogger()
@@ -75,7 +77,7 @@ def setup_file_logging(log_file):
log_dir = os.path.dirname(log_file)
if not os.path.exists(log_dir):
os.makedirs(log_dir)
- formatter = logging.Formatter('[%(asctime)s] %(levelname)s: %(message)s')
+ formatter = logging.Formatter(LOG_FORMAT)
handler = logging.FileHandler(log_file)
handler.setFormatter(formatter)
log.addHandler(handler)