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:10 +0100 |
commit | 1d043666710df1fa9d9586fd974c0371dd1514b0 (patch) | |
tree | ec6e6a72b8214fa1067cf172a71798ca448ffe8b | |
parent | ce1897a31afb5a14997bc3d2f459b90d43eecb7d (diff) | |
download | bitbake-1d043666710df1fa9d9586fd974c0371dd1514b0.tar.gz |
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().
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/server/process.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py index 83c3e6b44..21f95cb61 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -36,7 +36,7 @@ class ProcessTimeout(SystemExit): pass def serverlog(msg): - print(msg) + print(str(os.getpid()) + " " + datetime.datetime.now().strftime('%H:%M:%S.%f') + " " + msg) sys.stdout.flush() class ProcessServer(): @@ -480,7 +480,7 @@ class BitBakeServer(object): lines.append(line) else: lastlines.append(line) - res = logstart_re.match(line.rstrip()) + res = logstart_re.search(line.rstrip()) if res: ldatetime = datetime.datetime.strptime(res.group(2), start_log_datetime_format) if ldatetime >= startdatetime: |