[oe-commits] [bitbake] 01/03: bitbake: msg: Return config object

git at git.openembedded.org git at git.openembedded.org
Thu Mar 12 22:53:06 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 7b384f98dc2dc35bfd2d856d578496a2cf718bb5
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Thu Mar 12 13:30:02 2020 -0500

    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.
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/msg.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index 582165d..2ba4824 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list