summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-05 11:19:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-06 10:46:54 +0000
commite7febaa3436d61b90c2f54ee4d143ac5c5530db8 (patch)
tree0a8122159381ca8b997f22e1315aa906951cf210 /bitbake/lib/bb/build.py
parent9b5c770cbda8cfc4c108d94bd0ff5c0af3d0b64b (diff)
downloadpoky-e7febaa3436d61b90c2f54ee4d143ac5c5530db8.tar.gz
build: use logger.isEnabledFor, not getEffectiveLevel
I think this is less confusing, and avoids needing to know about the *range* of logging levels, instead simply asking what we really want to know. (Bitbake rev: dc2264387617586b5c0a61e126c75edde5e7abcd) Signed-off-by: Chris Larson <chris_larson@mentor.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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 96e4e2f077..2d8fe8be84 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -216,7 +216,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
216 216
217 with open(runfile, 'w') as script: 217 with open(runfile, 'w') as script:
218 script.write('#!/bin/sh -e\n') 218 script.write('#!/bin/sh -e\n')
219 if logger.getEffectiveLevel() <= logging.DEBUG: 219 if logger.isEnabledFor(logging.DEBUG):
220 script.write("set -x\n") 220 script.write("set -x\n")
221 data.emit_func(function, script, d) 221 data.emit_func(function, script, d)
222 222
@@ -230,7 +230,7 @@ def exec_func_shell(function, d, runfile, cwd=None):
230 230
231 cmd = runfile 231 cmd = runfile
232 232
233 if logger.getEffectiveLevel() <= logging.DEBUG: 233 if logger.isEnabledFor(logging.DEBUG):
234 logfile = LogTee(logger, sys.stdout) 234 logfile = LogTee(logger, sys.stdout)
235 else: 235 else:
236 logfile = sys.stdout 236 logfile = sys.stdout