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/build.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/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 974d2ff065..f4f897e41a 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -583,7 +583,7 @@ def _exec_task(fn, task, d, quieterr): | |||
583 | logger.error("No such task: %s" % task) | 583 | logger.error("No such task: %s" % task) |
584 | return 1 | 584 | return 1 |
585 | 585 | ||
586 | logger.debug(1, "Executing task %s", task) | 586 | logger.debug("Executing task %s", task) |
587 | 587 | ||
588 | localdata = _task_data(fn, task, d) | 588 | localdata = _task_data(fn, task, d) |
589 | tempdir = localdata.getVar('T') | 589 | tempdir = localdata.getVar('T') |
@@ -596,7 +596,7 @@ def _exec_task(fn, task, d, quieterr): | |||
596 | curnice = os.nice(0) | 596 | curnice = os.nice(0) |
597 | nice = int(nice) - curnice | 597 | nice = int(nice) - curnice |
598 | newnice = os.nice(nice) | 598 | newnice = os.nice(nice) |
599 | logger.debug(1, "Renice to %s " % newnice) | 599 | logger.debug("Renice to %s " % newnice) |
600 | ionice = localdata.getVar("BB_TASK_IONICE_LEVEL") | 600 | ionice = localdata.getVar("BB_TASK_IONICE_LEVEL") |
601 | if ionice: | 601 | if ionice: |
602 | try: | 602 | try: |
@@ -720,7 +720,7 @@ def _exec_task(fn, task, d, quieterr): | |||
720 | 720 | ||
721 | logfile.close() | 721 | logfile.close() |
722 | if os.path.exists(logfn) and os.path.getsize(logfn) == 0: | 722 | if os.path.exists(logfn) and os.path.getsize(logfn) == 0: |
723 | logger.debug(2, "Zero size logfn %s, removing", logfn) | 723 | logger.debug2("Zero size logfn %s, removing", logfn) |
724 | bb.utils.remove(logfn) | 724 | bb.utils.remove(logfn) |
725 | bb.utils.remove(loglink) | 725 | bb.utils.remove(loglink) |
726 | event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata) | 726 | event.fire(TaskSucceeded(task, fn, logfn, localdata), localdata) |