diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-05 11:23:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-05 11:45:18 +0100 |
commit | 707f99642a6f29f2db835aadb8afba672e265588 (patch) | |
tree | f63e1a5710e6fc8c29b2ed4af9da33d966972c0f /bitbake/lib | |
parent | f71587695c4ced368017f118276807cd3c043ac4 (diff) | |
download | poky-707f99642a6f29f2db835aadb8afba672e265588.tar.gz |
bitbake: server/process: Prefix the log data with pid/time information
Knowing which process printed which messages and the timestamp of the
message is useful for debugging, so add this. Ensure the log parsing
isn't affected by using search() instead of match().
(Bitbake rev: 1d043666710df1fa9d9586fd974c0371dd1514b0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 83c3e6b444..21f95cb61e 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -36,7 +36,7 @@ class ProcessTimeout(SystemExit): | |||
36 | pass | 36 | pass |
37 | 37 | ||
38 | def serverlog(msg): | 38 | def serverlog(msg): |
39 | print(msg) | 39 | print(str(os.getpid()) + " " + datetime.datetime.now().strftime('%H:%M:%S.%f') + " " + msg) |
40 | sys.stdout.flush() | 40 | sys.stdout.flush() |
41 | 41 | ||
42 | class ProcessServer(): | 42 | class ProcessServer(): |
@@ -480,7 +480,7 @@ class BitBakeServer(object): | |||
480 | lines.append(line) | 480 | lines.append(line) |
481 | else: | 481 | else: |
482 | lastlines.append(line) | 482 | lastlines.append(line) |
483 | res = logstart_re.match(line.rstrip()) | 483 | res = logstart_re.search(line.rstrip()) |
484 | if res: | 484 | if res: |
485 | ldatetime = datetime.datetime.strptime(res.group(2), start_log_datetime_format) | 485 | ldatetime = datetime.datetime.strptime(res.group(2), start_log_datetime_format) |
486 | if ldatetime >= startdatetime: | 486 | if ldatetime >= startdatetime: |