summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 11:23:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 11:45:18 +0100
commit707f99642a6f29f2db835aadb8afba672e265588 (patch)
treef63e1a5710e6fc8c29b2ed4af9da33d966972c0f /bitbake
parentf71587695c4ced368017f118276807cd3c043ac4 (diff)
downloadpoky-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')
-rw-r--r--bitbake/lib/bb/server/process.py4
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
38def serverlog(msg): 38def 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
42class ProcessServer(): 42class 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: