summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerChris Larson <chris_larson@mentor.com>2010-09-03 18:51:54 -0700
commit3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d (patch)
tree1f77ebed5e5f48fd786286a51dd697113cb7ea28 /lib/bb/parse/parse_py/BBHandler.py
parentc23c015cf8af1868faf293b19b80a5faf7e736a5 (diff)
downloadbitbake-3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d.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 Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index bb5617488..bda6acc94 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -27,11 +27,12 @@
from __future__ import absolute_import
import re, bb, os
+import logging
import bb.fetch, bb.build, bb.utils
from bb import data
from . import ConfHandler
-from .. import resolve_file, ast
+from .. import resolve_file, ast, logger
from .ConfHandler import include, init
# For compatibility
@@ -76,7 +77,7 @@ def inherit(files, d):
file = os.path.join('classes', '%s.bbclass' % file)
if not file in __inherit_cache:
- bb.msg.debug(2, bb.msg.domain.Parsing, "BB %s:%d: inheriting %s" % (fn, lineno, file))
+ logger.log(logging.DEBUG -1, "BB %s:%d: inheriting %s", fn, lineno, file)
__inherit_cache.append( file )
data.setVar('__inherit_cache', __inherit_cache, d)
include(fn, file, d, "inherit")
@@ -115,9 +116,9 @@ def handle(fn, d, include):
if include == 0:
- bb.msg.debug(2, bb.msg.domain.Parsing, "BB " + fn + ": handle(data)")
+ logger.debug(2, "BB %s: handle(data)", fn)
else:
- bb.msg.debug(2, bb.msg.domain.Parsing, "BB " + fn + ": handle(data, include)")
+ logger.debug(2, "BB %s: handle(data, include)", fn)
(root, ext) = os.path.splitext(os.path.basename(fn))
base_name = "%s%s" % (root, ext)