summaryrefslogtreecommitdiffstats
path: root/lib/bb/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-07 14:06:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-07 14:13:09 +0100
commit2076f12cc2f809345108b1606bd6201f41287505 (patch)
tree064f67c0d079a1419fd0bebe4a147fbf94376798 /lib/bb/__init__.py
parent0594faa0b52ce5dbd948d836d88617d38d9862d1 (diff)
downloadbitbake-2076f12cc2f809345108b1606bd6201f41287505.tar.gz
msg: Add explicit verbnote log level
It has become apparant we need a log level which reaches the console but isn't a warning/error. Add "verbnote" as a way of doing this, behaves as a note but with a higher priority. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/__init__.py')
-rw-r--r--lib/bb/__init__.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 4e9f6e353..170c592ac 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -63,6 +63,10 @@ class BBLogger(Logger):
def verbose(self, msg, *args, **kwargs):
return self.log(logging.INFO - 1, msg, *args, **kwargs)
+ def verbnote(self, msg, *args, **kwargs):
+ return self.log(logging.INFO + 2, msg, *args, **kwargs)
+
+
logging.raiseExceptions = False
logging.setLoggerClass(BBLogger)
@@ -93,6 +97,18 @@ def debug(lvl, *args):
def note(*args):
mainlogger.info(''.join(args))
+#
+# A higher prioity note which will show on the console but isn't a warning
+#
+# Something is happening the user should be aware of but they probably did
+# something to make it happen
+#
+def verbnote(*args):
+ mainlogger.verbnote(''.join(args))
+
+#
+# Warnings - things the user likely needs to pay attention to and fix
+#
def warn(*args):
mainlogger.warning(''.join(args))