From 729ec0bebb81a7ce14b668a36bee1b831648bb42 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Thu, 17 Feb 2022 10:58:53 -0600 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/msg.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bitbake/lib/bb/msg.py') 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 """Standalone logger creation function""" logger = logging.getLogger(name) console = logging.StreamHandler(output) + console.addFilter(bb.msg.LogFilterShowOnce()) format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s") if color == 'always' or (color == 'auto' and output.isatty()): format.enable_color() -- cgit v1.2.3-54-g00ecf