summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/bitbake3
-rw-r--r--bitbake/lib/bb/cooker.py11
-rw-r--r--bitbake/lib/bb/utils.py16
3 files changed, 19 insertions, 11 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 1a45ec4f79..0f4ff88171 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -152,6 +152,9 @@ Default BBFILES are the .bb files in the current directory.""" )
152 # server is daemonized this logfile will be truncated. 152 # server is daemonized this logfile will be truncated.
153 cooker_logfile = os.path.join (os.getcwd(), "cooker.log") 153 cooker_logfile = os.path.join (os.getcwd(), "cooker.log")
154 154
155 bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug,
156 configuration.debug_domains)
157
155 cooker = bb.cooker.BBCooker(configuration, server) 158 cooker = bb.cooker.BBCooker(configuration, server)
156 159
157 # Clear away any spurious environment variables. But don't wipe the 160 # Clear away any spurious environment variables. But don't wipe the
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 3881df484a..2406dfe95b 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -72,17 +72,6 @@ class BBCooker:
72 72
73 self.configuration = configuration 73 self.configuration = configuration
74 74
75 if self.configuration.verbose:
76 bb.msg.set_verbose(True)
77
78 if self.configuration.debug:
79 bb.msg.set_debug_level(self.configuration.debug)
80 else:
81 bb.msg.set_debug_level(0)
82
83 if self.configuration.debug_domains:
84 bb.msg.set_debug_domains(self.configuration.debug_domains)
85
86 self.configuration.data = bb.data.init() 75 self.configuration.data = bb.data.init()
87 76
88 bb.data.inheritFromOS(self.configuration.data) 77 bb.data.inheritFromOS(self.configuration.data)
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index ad0aa68b27..40326f98d2 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -614,3 +614,19 @@ def which(path, item, direction = 0):
614 return next 614 return next
615 615
616 return "" 616 return ""
617
618def init_logger(logger, verbose, debug, debug_domains):
619 """
620 Set verbosity and debug levels in the logger
621 """
622
623 if verbose:
624 logger.set_verbose(True)
625
626 if debug:
627 logger.set_debug_level(debug)
628 else:
629 logger.set_debug_level(0)
630
631 if debug_domains:
632 logger.set_debug_domains(debug_domains)