summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py11
-rw-r--r--bitbake/lib/bb/utils.py16
2 files changed, 16 insertions, 11 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3881df484..2406dfe95 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -72,17 +72,6 @@ class BBCooker:
self.configuration = configuration
- if self.configuration.verbose:
- bb.msg.set_verbose(True)
-
- if self.configuration.debug:
- bb.msg.set_debug_level(self.configuration.debug)
- else:
- bb.msg.set_debug_level(0)
-
- if self.configuration.debug_domains:
- bb.msg.set_debug_domains(self.configuration.debug_domains)
-
self.configuration.data = bb.data.init()
bb.data.inheritFromOS(self.configuration.data)
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index ad0aa68b2..40326f98d 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -614,3 +614,19 @@ def which(path, item, direction = 0):
return next
return ""
+
+def init_logger(logger, verbose, debug, debug_domains):
+ """
+ Set verbosity and debug levels in the logger
+ """
+
+ if verbose:
+ logger.set_verbose(True)
+
+ if debug:
+ logger.set_debug_level(debug)
+ else:
+ logger.set_debug_level(0)
+
+ if debug_domains:
+ logger.set_debug_domains(debug_domains)