diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-19 16:01:33 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-20 16:06:02 +0100 |
commit | b26c43c13eb959cb3f18b402d399fa8292e5fc7a (patch) | |
tree | 40518cbe50cfcce345f4001ae274ab479371077b /scripts | |
parent | f019bb933f8016d33937d755887700f9a446408e (diff) | |
download | poky-b26c43c13eb959cb3f18b402d399fa8292e5fc7a.tar.gz |
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.
(From OE-Core rev: bafcff95e2b5e0b9a8c76ce46a62667bf6f49b00)
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-x | scripts/oe-build-perf-test | 6 |
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 | |||
34 | 34 | ||
35 | 35 | ||
36 | # Set-up logging | 36 | # Set-up logging |
37 | logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s') | 37 | LOG_FORMAT = '[%(asctime)s] %(levelname)s: %(message)s' |
38 | logging.basicConfig(level=logging.INFO, format=LOG_FORMAT, | ||
39 | datefmt='%Y-%m-%d %H:%M:%S') | ||
38 | log = logging.getLogger() | 40 | log = logging.getLogger() |
39 | 41 | ||
40 | 42 | ||
@@ -75,7 +77,7 @@ def setup_file_logging(log_file): | |||
75 | log_dir = os.path.dirname(log_file) | 77 | log_dir = os.path.dirname(log_file) |
76 | if not os.path.exists(log_dir): | 78 | if not os.path.exists(log_dir): |
77 | os.makedirs(log_dir) | 79 | os.makedirs(log_dir) |
78 | formatter = logging.Formatter('[%(asctime)s] %(levelname)s: %(message)s') | 80 | formatter = logging.Formatter(LOG_FORMAT) |
79 | handler = logging.FileHandler(log_file) | 81 | handler = logging.FileHandler(log_file) |
80 | handler.setFormatter(formatter) | 82 | handler.setFormatter(formatter) |
81 | log.addHandler(handler) | 83 | log.addHandler(handler) |