mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake: Move the logger initialization from cooker to utils
In order to move the environment cleaning, which wants to log a message, before cooker creation, the logging facility initialization needs to happen earlier. So, it is now in init_logger in utils.py and called from bitbake before the creation of the data object. It also seems more correct to initialize a global facility like this from a more global context than the creation of an object, of which there could theoretically be many. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
132122e313
commit
f9d7e9e3be
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user