summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/msg.py
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2022-02-17 10:58:53 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-17 17:51:03 +0000
commit729ec0bebb81a7ce14b668a36bee1b831648bb42 (patch)
treeee3711c4e496b62b14b2b9a37d5c8953a1d2fd02 /bitbake/lib/bb/msg.py
parentdac63330e6879a0354449c8ad52f09a888d49d27 (diff)
downloadpoky-729ec0bebb81a7ce14b668a36bee1b831648bb42.tar.gz
bitbake: msg: Ensure manually created loggers have the once filter
Loggers created with a logging configuration file automatically get the once filter applied to ensure that warnonce()/erroronce() only appear a single time. The same filter needs to also be added to bb.msg.logger_create() to ensure that manually created loggers have the same behavior (Bitbake rev: bd93f7baff9d56de37a1af474189e0888b82d475) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/msg.py')
-rw-r--r--bitbake/lib/bb/msg.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 512ec1f5c1..c95a874beb 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -229,6 +229,7 @@ def logger_create(name, output=sys.stderr, level=logging.INFO, preserve_handlers
229 """Standalone logger creation function""" 229 """Standalone logger creation function"""
230 logger = logging.getLogger(name) 230 logger = logging.getLogger(name)
231 console = logging.StreamHandler(output) 231 console = logging.StreamHandler(output)
232 console.addFilter(bb.msg.LogFilterShowOnce())
232 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s") 233 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
233 if color == 'always' or (color == 'auto' and output.isatty()): 234 if color == 'always' or (color == 'auto' and output.isatty()):
234 format.enable_color() 235 format.enable_color()