summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/msg.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/msg.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/msg.py')
-rw-r--r--bitbake/lib/bb/msg.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 254ba07a04..bd01d79028 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -111,19 +111,25 @@ def set_debug_domains(domainargs):
111def debug(level, msgdomain, msg, fn = None): 111def debug(level, msgdomain, msg, fn = None):
112 level = logging.DEBUG - (level - 1) 112 level = logging.DEBUG - (level - 1)
113 if not msgdomain: 113 if not msgdomain:
114 logger.log(level, msg) 114 logger.debug(level, msg)
115 else: 115 else:
116 loggers[msgdomain].log(level, msg) 116 loggers[msgdomain].debug(level, msg)
117 117
118def plain(msg, fn = None): 118def plain(msg, fn = None):
119 logger.log(logging.INFO + 1, msg) 119 logger.log(logging.INFO + 1, msg)
120 logger.plain(msg)
120 121
121def note(level, msgdomain, msg, fn = None): 122def note(level, msgdomain, msg, fn = None):
122 level = logging.INFO - (level - 1) 123 if level > 1:
123 if not msgdomain: 124 if msgdomain:
124 logger.log(level, msg) 125 logger.verbose(msg)
126 else:
127 loggers[msgdomain].verbose(msg)
125 else: 128 else:
126 loggers[msgdomain].log(level, msg) 129 if msgdomain:
130 logger.info(msg)
131 else:
132 loggers[msgdomain].info(msg)
127 133
128def warn(msgdomain, msg, fn = None): 134def warn(msgdomain, msg, fn = None):
129 if not msgdomain: 135 if not msgdomain: