diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-06-10 10:35:31 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:33 +0000 |
| commit | ecc68fa4fbb579e97ea45156e79a293b073697a0 (patch) | |
| tree | 6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/lib/bb/parse/ast.py | |
| parent | d3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff) | |
| download | poky-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/parse/ast.py')
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 870ae65b0e..55ab485990 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -23,9 +23,13 @@ | |||
| 23 | 23 | ||
| 24 | from __future__ import absolute_import | 24 | from __future__ import absolute_import |
| 25 | from future_builtins import filter | 25 | from future_builtins import filter |
| 26 | import bb, re, string | 26 | import re |
| 27 | from bb import methodpool | 27 | import string |
| 28 | import logging | ||
| 29 | import bb | ||
| 28 | import itertools | 30 | import itertools |
| 31 | from bb import methodpool | ||
| 32 | from bb.parse import logger | ||
| 29 | 33 | ||
| 30 | __word__ = re.compile(r"\S+") | 34 | __word__ = re.compile(r"\S+") |
| 31 | __parsed_methods__ = bb.methodpool.get_parsed_dict() | 35 | __parsed_methods__ = bb.methodpool.get_parsed_dict() |
| @@ -51,7 +55,7 @@ class IncludeNode(AstNode): | |||
| 51 | Include the file and evaluate the statements | 55 | Include the file and evaluate the statements |
| 52 | """ | 56 | """ |
| 53 | s = bb.data.expand(self.what_file, data) | 57 | s = bb.data.expand(self.what_file, data) |
| 54 | bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (self.from_fn, self.from_lineno, s)) | 58 | logger.debug(2, "CONF %s:%s: including %s", self.from_fn, self.from_lineno, s) |
| 55 | 59 | ||
| 56 | # TODO: Cache those includes... maybe not here though | 60 | # TODO: Cache those includes... maybe not here though |
| 57 | if self.force: | 61 | if self.force: |
| @@ -365,7 +369,7 @@ def _expand_versions(versions): | |||
| 365 | def multi_finalize(fn, d): | 369 | def multi_finalize(fn, d): |
| 366 | appends = (d.getVar("__BBAPPEND", True) or "").split() | 370 | appends = (d.getVar("__BBAPPEND", True) or "").split() |
| 367 | for append in appends: | 371 | for append in appends: |
| 368 | bb.msg.debug(2, bb.msg.domain.Parsing, "Appending .bbappend file " + append + " to " + fn) | 372 | logger.debug(2, "Appending .bbappend file %s to %s", append, fn) |
| 369 | bb.parse.BBHandler.handle(append, d, True) | 373 | bb.parse.BBHandler.handle(append, d, True) |
| 370 | 374 | ||
| 371 | safe_d = d | 375 | safe_d = d |
