mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 18:23:02 +01:00
bitbake: lib/bb/msg: Add repr for BBLogFormatter
Adds a __repr__ function for BBLogFormatter. This allows it to get a human readable string when printed using the logging_tree module (Bitbake rev: 5ff962dca71f4ef16a3aa11b41a23f2227fe8c21) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4c9a412999
commit
4bbd4dc6b5
@@ -98,6 +98,9 @@ class BBLogFormatter(logging.Formatter):
|
||||
def enable_color(self):
|
||||
self.color_enabled = True
|
||||
|
||||
def __repr__(self):
|
||||
return "%s fmt='%s' color=%s" % (self.__class__.__name__, self._fmt, "True" if self.color_enabled else "False")
|
||||
|
||||
class BBLogFilter(object):
|
||||
def __init__(self, handler, level, debug_domains):
|
||||
self.stdlevel = level
|
||||
|
||||
Reference in New Issue
Block a user