mirror of
https://git.yoctoproject.org/poky
synced 2026-04-25 15:32:13 +02:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user