mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 06:32:34 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
7283a0b3b6
commit
75f87db413
@@ -131,7 +131,7 @@ class TaskData:
|
||||
for depend in dataCache.deps[fn]:
|
||||
dependids.add(depend)
|
||||
self.depids[fn] = list(dependids)
|
||||
logger.debug(2, "Added dependencies %s for %s", str(dataCache.deps[fn]), fn)
|
||||
logger.debug2("Added dependencies %s for %s", str(dataCache.deps[fn]), fn)
|
||||
|
||||
# Work out runtime dependencies
|
||||
if not fn in self.rdepids:
|
||||
@@ -149,9 +149,9 @@ class TaskData:
|
||||
rreclist.append(rdepend)
|
||||
rdependids.add(rdepend)
|
||||
if rdependlist:
|
||||
logger.debug(2, "Added runtime dependencies %s for %s", str(rdependlist), fn)
|
||||
logger.debug2("Added runtime dependencies %s for %s", str(rdependlist), fn)
|
||||
if rreclist:
|
||||
logger.debug(2, "Added runtime recommendations %s for %s", str(rreclist), fn)
|
||||
logger.debug2("Added runtime recommendations %s for %s", str(rreclist), fn)
|
||||
self.rdepids[fn] = list(rdependids)
|
||||
|
||||
for dep in self.depids[fn]:
|
||||
@@ -378,7 +378,7 @@ class TaskData:
|
||||
for fn in eligible:
|
||||
if fn in self.failed_fns:
|
||||
continue
|
||||
logger.debug(2, "adding %s to satisfy %s", fn, item)
|
||||
logger.debug2("adding %s to satisfy %s", fn, item)
|
||||
self.add_build_target(fn, item)
|
||||
self.add_tasks(fn, dataCache)
|
||||
|
||||
@@ -431,7 +431,7 @@ class TaskData:
|
||||
for fn in eligible:
|
||||
if fn in self.failed_fns:
|
||||
continue
|
||||
logger.debug(2, "adding '%s' to satisfy runtime '%s'", fn, item)
|
||||
logger.debug2("adding '%s' to satisfy runtime '%s'", fn, item)
|
||||
self.add_runtime_target(fn, item)
|
||||
self.add_tasks(fn, dataCache)
|
||||
|
||||
@@ -446,7 +446,7 @@ class TaskData:
|
||||
return
|
||||
if not missing_list:
|
||||
missing_list = []
|
||||
logger.debug(1, "File '%s' is unbuildable, removing...", fn)
|
||||
logger.debug("File '%s' is unbuildable, removing...", fn)
|
||||
self.failed_fns.append(fn)
|
||||
for target in self.build_targets:
|
||||
if fn in self.build_targets[target]:
|
||||
@@ -526,7 +526,7 @@ class TaskData:
|
||||
added = added + 1
|
||||
except (bb.providers.NoRProvider, bb.providers.MultipleRProvider):
|
||||
self.remove_runtarget(target)
|
||||
logger.debug(1, "Resolved " + str(added) + " extra dependencies")
|
||||
logger.debug("Resolved " + str(added) + " extra dependencies")
|
||||
if added == 0:
|
||||
break
|
||||
# self.dump_data()
|
||||
@@ -549,38 +549,38 @@ class TaskData:
|
||||
"""
|
||||
Dump some debug information on the internal data structures
|
||||
"""
|
||||
logger.debug(3, "build_names:")
|
||||
logger.debug(3, ", ".join(self.build_targets))
|
||||
logger.debug3("build_names:")
|
||||
logger.debug3(", ".join(self.build_targets))
|
||||
|
||||
logger.debug(3, "run_names:")
|
||||
logger.debug(3, ", ".join(self.run_targets))
|
||||
logger.debug3("run_names:")
|
||||
logger.debug3(", ".join(self.run_targets))
|
||||
|
||||
logger.debug(3, "build_targets:")
|
||||
logger.debug3("build_targets:")
|
||||
for target in self.build_targets:
|
||||
targets = "None"
|
||||
if target in self.build_targets:
|
||||
targets = self.build_targets[target]
|
||||
logger.debug(3, " %s: %s", target, targets)
|
||||
logger.debug3(" %s: %s", target, targets)
|
||||
|
||||
logger.debug(3, "run_targets:")
|
||||
logger.debug3("run_targets:")
|
||||
for target in self.run_targets:
|
||||
targets = "None"
|
||||
if target in self.run_targets:
|
||||
targets = self.run_targets[target]
|
||||
logger.debug(3, " %s: %s", target, targets)
|
||||
logger.debug3(" %s: %s", target, targets)
|
||||
|
||||
logger.debug(3, "tasks:")
|
||||
logger.debug3("tasks:")
|
||||
for tid in self.taskentries:
|
||||
logger.debug(3, " %s: %s %s %s",
|
||||
logger.debug3(" %s: %s %s %s",
|
||||
tid,
|
||||
self.taskentries[tid].idepends,
|
||||
self.taskentries[tid].irdepends,
|
||||
self.taskentries[tid].tdepends)
|
||||
|
||||
logger.debug(3, "dependency ids (per fn):")
|
||||
logger.debug3("dependency ids (per fn):")
|
||||
for fn in self.depids:
|
||||
logger.debug(3, " %s: %s", fn, self.depids[fn])
|
||||
logger.debug3(" %s: %s", fn, self.depids[fn])
|
||||
|
||||
logger.debug(3, "runtime dependency ids (per fn):")
|
||||
logger.debug3("runtime dependency ids (per fn):")
|
||||
for fn in self.rdepids:
|
||||
logger.debug(3, " %s: %s", fn, self.rdepids[fn])
|
||||
logger.debug3(" %s: %s", fn, self.rdepids[fn])
|
||||
|
||||
Reference in New Issue
Block a user