summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r--bitbake/lib/bb/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index e01b8d5256..269f65edce 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -71,6 +71,13 @@ class BBLoggerMixin(object):
71 def verbnote(self, msg, *args, **kwargs): 71 def verbnote(self, msg, *args, **kwargs):
72 return self.log(logging.INFO + 2, msg, *args, **kwargs) 72 return self.log(logging.INFO + 2, msg, *args, **kwargs)
73 73
74 def warnonce(self, msg, *args, **kwargs):
75 return self.log(logging.WARNING - 1, msg, *args, **kwargs)
76
77 def erroronce(self, msg, *args, **kwargs):
78 return self.log(logging.ERROR - 1, msg, *args, **kwargs)
79
80
74Logger = logging.getLoggerClass() 81Logger = logging.getLoggerClass()
75class BBLogger(Logger, BBLoggerMixin): 82class BBLogger(Logger, BBLoggerMixin):
76 def __init__(self, name, *args, **kwargs): 83 def __init__(self, name, *args, **kwargs):
@@ -157,9 +164,15 @@ def verbnote(*args):
157def warn(*args): 164def warn(*args):
158 mainlogger.warning(''.join(args)) 165 mainlogger.warning(''.join(args))
159 166
167def warnonce(*args):
168 mainlogger.warnonce(''.join(args))
169
160def error(*args, **kwargs): 170def error(*args, **kwargs):
161 mainlogger.error(''.join(args), extra=kwargs) 171 mainlogger.error(''.join(args), extra=kwargs)
162 172
173def erroronce(*args):
174 mainlogger.erroronce(''.join(args))
175
163def fatal(*args, **kwargs): 176def fatal(*args, **kwargs):
164 mainlogger.critical(''.join(args), extra=kwargs) 177 mainlogger.critical(''.join(args), extra=kwargs)
165 raise BBHandledException() 178 raise BBHandledException()