diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2021-02-09 09:50:21 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-10 23:48:16 +0000 |
commit | 75f87db413f3659fee18eff389b7b339b01cce15 (patch) | |
tree | e733135549b516c72c4f34172b6bbf865377fc76 /bitbake/lib/bb/ui/buildinfohelper.py | |
parent | 7283a0b3b6ca49d0d2e13593333a580ef10439a8 (diff) | |
download | poky-75f87db413f3659fee18eff389b7b339b01cce15.tar.gz |
bitbake: logging: Make bitbake logger compatible with python logger
The bitbake logger overrode the definition of the debug() logging call
to include a debug level, but this causes problems with code that may
be using standard python logging, since the extra argument is
interpreted differently.
Instead, change the bitbake loggers debug() call to match the python
logger call and add a debug2() and debug3() API to replace calls that
were logging to a different debug level.
[RP: Small fix to ensure bb.debug calls bbdebug()]
(Bitbake rev: f68682a79d83e6399eb403f30a1f113516575f51)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 82c62e3324..43aa592842 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -148,14 +148,14 @@ class ORMWrapper(object): | |||
148 | buildrequest = None | 148 | buildrequest = None |
149 | if brbe is not None: | 149 | if brbe is not None: |
150 | # Toaster-triggered build | 150 | # Toaster-triggered build |
151 | logger.debug(1, "buildinfohelper: brbe is %s" % brbe) | 151 | logger.debug("buildinfohelper: brbe is %s" % brbe) |
152 | br, _ = brbe.split(":") | 152 | br, _ = brbe.split(":") |
153 | buildrequest = BuildRequest.objects.get(pk=br) | 153 | buildrequest = BuildRequest.objects.get(pk=br) |
154 | prj = buildrequest.project | 154 | prj = buildrequest.project |
155 | else: | 155 | else: |
156 | # CLI build | 156 | # CLI build |
157 | prj = Project.objects.get_or_create_default_project() | 157 | prj = Project.objects.get_or_create_default_project() |
158 | logger.debug(1, "buildinfohelper: project is not specified, defaulting to %s" % prj) | 158 | logger.debug("buildinfohelper: project is not specified, defaulting to %s" % prj) |
159 | 159 | ||
160 | if buildrequest is not None: | 160 | if buildrequest is not None: |
161 | # reuse existing Build object | 161 | # reuse existing Build object |
@@ -171,7 +171,7 @@ class ORMWrapper(object): | |||
171 | completed_on=now, | 171 | completed_on=now, |
172 | build_name='') | 172 | build_name='') |
173 | 173 | ||
174 | logger.debug(1, "buildinfohelper: build is created %s" % build) | 174 | logger.debug("buildinfohelper: build is created %s" % build) |
175 | 175 | ||
176 | if buildrequest is not None: | 176 | if buildrequest is not None: |
177 | buildrequest.build = build | 177 | buildrequest.build = build |
@@ -906,7 +906,7 @@ class BuildInfoHelper(object): | |||
906 | 906 | ||
907 | self.project = None | 907 | self.project = None |
908 | 908 | ||
909 | logger.debug(1, "buildinfohelper: Build info helper inited %s" % vars(self)) | 909 | logger.debug("buildinfohelper: Build info helper inited %s" % vars(self)) |
910 | 910 | ||
911 | 911 | ||
912 | ################### | 912 | ################### |
@@ -1620,7 +1620,7 @@ class BuildInfoHelper(object): | |||
1620 | # if we have a backlog of events, do our best to save them here | 1620 | # if we have a backlog of events, do our best to save them here |
1621 | if len(self.internal_state['backlog']): | 1621 | if len(self.internal_state['backlog']): |
1622 | tempevent = self.internal_state['backlog'].pop() | 1622 | tempevent = self.internal_state['backlog'].pop() |
1623 | logger.debug(1, "buildinfohelper: Saving stored event %s " | 1623 | logger.debug("buildinfohelper: Saving stored event %s " |
1624 | % tempevent) | 1624 | % tempevent) |
1625 | self.store_log_event(tempevent,cli_backlog) | 1625 | self.store_log_event(tempevent,cli_backlog) |
1626 | else: | 1626 | else: |