summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:33 +0000
commitecc68fa4fbb579e97ea45156e79a293b073697a0 (patch)
tree6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/lib/bb/data_smart.py
parentd3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff)
downloadpoky-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r--bitbake/lib/bb/data_smart.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 22dadec5de..7de90056d5 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -30,10 +30,12 @@ BitBake build tools.
30 30
31import copy, re, sys 31import copy, re, sys
32from collections import MutableMapping 32from collections import MutableMapping
33import logging
33import bb 34import bb
34from bb import utils 35from bb import utils
35from bb.COW import COWDictBase 36from bb.COW import COWDictBase
36 37
38logger = logging.getLogger("BitBake.Data")
37 39
38__setvar_keyword__ = ["_append", "_prepend"] 40__setvar_keyword__ = ["_append", "_prepend"]
39__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend)(_(?P<add>.*))?') 41__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend)(_(?P<add>.*))?')
@@ -101,10 +103,8 @@ class DataSmart(MutableMapping):
101 s = __expand_python_regexp__.sub(varparse.python_sub, s) 103 s = __expand_python_regexp__.sub(varparse.python_sub, s)
102 if s == olds: 104 if s == olds:
103 break 105 break
104 except KeyboardInterrupt: 106 except Exception:
105 raise 107 logger.exception("Error evaluating '%s'", s)
106 except:
107 bb.msg.note(1, bb.msg.domain.Data, "%s:%s while evaluating:\n%s" % (sys.exc_info()[0], sys.exc_info()[1], s))
108 raise 108 raise
109 109
110 varparse.value = s 110 varparse.value = s
@@ -152,7 +152,7 @@ class DataSmart(MutableMapping):
152 try: 152 try:
153 self[name] = self[var] 153 self[name] = self[var]
154 except Exception: 154 except Exception:
155 bb.msg.note(1, bb.msg.domain.Data, "Untracked delVar") 155 logger.info("Untracked delVar")
156 156
157 # now on to the appends and prepends 157 # now on to the appends and prepends
158 for op in __setvar_keyword__: 158 for op in __setvar_keyword__: