summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index f8577c679..9c57c65f8 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -35,6 +35,11 @@ class NullHandler(logging.Handler):
def emit(self, record):
pass
+class BBLogRecord(logging.LogRecord):
+ def __init__(self, name, level, fn, lno, msg, args, exc_info, func, extra):
+ self.taskpid = bb.event.worker_pid
+ logging.LogRecord.__init__(self, name, level, fn, lno, msg, args, exc_info, func)
+
Logger = logging.getLoggerClass()
class BBLogger(Logger):
def __init__(self, name):
@@ -42,6 +47,9 @@ class BBLogger(Logger):
self.debug = self.bbdebug
Logger.__init__(self, name)
+ def makeRecord(self, name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None):
+ return BBLogRecord(name, lvl, fn, lno, msg, args, exc_info, func, extra)
+
def bbdebug(self, level, msg, *args, **kwargs):
return self.log(logging.DEBUG - level - 1, msg, *args, **kwargs)