summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2020-03-09 11:33:42 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-13 11:29:23 +0000
commit4bbd4dc6b5a95d9b2ddd278b4fd9c5a2e8c19b41 (patch)
tree3bf119281d051f26aac12fbe4a33a5d650ac4682 /bitbake/lib
parent4c9a4129994a6cf3adfcd1e286735f9354b9ca4c (diff)
downloadpoky-4bbd4dc6b5a95d9b2ddd278b4fd9c5a2e8c19b41.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/msg.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index ea6a9543f7..c70fd80806 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -98,6 +98,9 @@ class BBLogFormatter(logging.Formatter):
98 def enable_color(self): 98 def enable_color(self):
99 self.color_enabled = True 99 self.color_enabled = True
100 100
101 def __repr__(self):
102 return "%s fmt='%s' color=%s" % (self.__class__.__name__, self._fmt, "True" if self.color_enabled else "False")
103
101class BBLogFilter(object): 104class BBLogFilter(object):
102 def __init__(self, handler, level, debug_domains): 105 def __init__(self, handler, level, debug_domains):
103 self.stdlevel = level 106 self.stdlevel = level