summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2020-03-12 13:30:02 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-13 11:29:23 +0000
commit0dd9e5a84d83cd3b1f623cae52fea10f5eb59f9b (patch)
tree1580b0e390c9655322476099567c0f30ce6590ed /bitbake
parentb2d55ec1eb7e02579d05b1e1dc0243c33c565420 (diff)
downloadpoky-0dd9e5a84d83cd3b1f623cae52fea10f5eb59f9b.tar.gz
bitbake: msg: Return config object
Returns the configuration object from setLoggingConfig(). This object has a config dictionary that contains all of the created handlers, filters and loggers, which makes it much easier to pull out items with specific names. (Bitbake rev: 93c98a85cb10d3795b3cebc9cd97214d0f4748e5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/msg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 582165dd08..2ba4824227 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -306,7 +306,8 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
306 if "level" in l: 306 if "level" in l:
307 l["level"] = bb.msg.stringToLevel(l["level"]) 307 l["level"] = bb.msg.stringToLevel(l["level"])
308 308
309 logging.config.dictConfig(logconfig) 309 conf = logging.config.dictConfigClass(logconfig)
310 conf.configure()
310 311
311 # The user may have specified logging domains they want at a higher debug 312 # The user may have specified logging domains they want at a higher debug
312 # level than the standard. 313 # level than the standard.
@@ -328,6 +329,8 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
328 #if newlevel < bb.msg.loggerDefaultLogLevel: 329 #if newlevel < bb.msg.loggerDefaultLogLevel:
329 # bb.msg.loggerDefaultLogLevel = newlevel 330 # bb.msg.loggerDefaultLogLevel = newlevel
330 331
332 return conf
333
331def cleanupLogging(): 334def cleanupLogging():
332 # Iterate through all the handlers and close them if possible. Fixes 335 # Iterate through all the handlers and close them if possible. Fixes
333 # 'Unclosed resource' warnings when bitbake exits, see 336 # 'Unclosed resource' warnings when bitbake exits, see