summaryrefslogtreecommitdiffstats
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-12 23:03:30 +0000
commit93c98a85cb10d3795b3cebc9cd97214d0f4748e5 (patch)
treeebc90ea4329368c6c47075156df8f4043636e3dc
parent766587c0baaaeb5cda3e9454395edbb70e33f756 (diff)
downloadbitbake-93c98a85cb10d3795b3cebc9cd97214d0f4748e5.tar.gz
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. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/msg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index 582165dd0..2ba482422 100644
--- a/lib/bb/msg.py
+++ b/lib/bb/msg.py
@@ -306,7 +306,8 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
if "level" in l:
l["level"] = bb.msg.stringToLevel(l["level"])
- logging.config.dictConfig(logconfig)
+ conf = logging.config.dictConfigClass(logconfig)
+ conf.configure()
# The user may have specified logging domains they want at a higher debug
# level than the standard.
@@ -328,6 +329,8 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
#if newlevel < bb.msg.loggerDefaultLogLevel:
# bb.msg.loggerDefaultLogLevel = newlevel
+ return conf
+
def cleanupLogging():
# Iterate through all the handlers and close them if possible. Fixes
# 'Unclosed resource' warnings when bitbake exits, see