Switch bitbake internals to use logging directly rather than bb.msg

We use a custom Logger subclass for our loggers

This logger provides:
- 'debug' method which accepts a debug level
- 'plain' method which bypasses log formatting
- 'verbose' method which is more detail than info, but less than debug

(Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson
2010-06-10 10:35:31 -07:00
committed by Richard Purdie
parent d3a45c7d41
commit ecc68fa4fb
28 changed files with 374 additions and 322 deletions

View File

@@ -30,10 +30,12 @@ BitBake build tools.
import copy, re, sys
from collections import MutableMapping
import logging
import bb
from bb import utils
from bb.COW import COWDictBase
logger = logging.getLogger("BitBake.Data")
__setvar_keyword__ = ["_append", "_prepend"]
__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend)(_(?P<add>.*))?')
@@ -101,10 +103,8 @@ class DataSmart(MutableMapping):
s = __expand_python_regexp__.sub(varparse.python_sub, s)
if s == olds:
break
except KeyboardInterrupt:
raise
except:
bb.msg.note(1, bb.msg.domain.Data, "%s:%s while evaluating:\n%s" % (sys.exc_info()[0], sys.exc_info()[1], s))
except Exception:
logger.exception("Error evaluating '%s'", s)
raise
varparse.value = s
@@ -152,7 +152,7 @@ class DataSmart(MutableMapping):
try:
self[name] = self[var]
except Exception:
bb.msg.note(1, bb.msg.domain.Data, "Untracked delVar")
logger.info("Untracked delVar")
# now on to the appends and prepends
for op in __setvar_keyword__: