diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-15 08:39:19 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-15 08:39:19 +0000 |
commit | 75306742144eb1bd2d57c986d1f836a59a1f0e8b (patch) | |
tree | d1a15e84c1ae3c5c2dff906bbdba3d12bf5186e3 /bitbake/lib/bb/msg.py | |
parent | d7892c265b0e820a28e62a4aa0819d90ea354a5b (diff) | |
download | openembedded-core-contrib-75306742144eb1bd2d57c986d1f836a59a1f0e8b.tar.gz |
bitbake: Sync with upstream 1.8 branch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2497 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/msg.py')
-rw-r--r-- | bitbake/lib/bb/msg.py | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index 98cb6e6bf3..a1b31e5d60 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py @@ -66,6 +66,9 @@ class MsgError(MsgBase): class MsgFatal(MsgBase): """Fatal Message""" +class MsgPlain(MsgBase): + """General output""" + # # Message control functions # @@ -87,51 +90,40 @@ def set_debug_domains(domains): bb.msg.debug_level[ddomain] = bb.msg.debug_level[ddomain] + 1 found = True if not found: - std_warn("Logging domain %s is not valid, ignoring" % domain) + bb.msg.warn(None, "Logging domain %s is not valid, ignoring" % domain) # # Message handling functions # def debug(level, domain, msg, fn = None): + bb.event.fire(MsgDebug(msg, None)) + if not domain: + domain = 'default' if debug_level[domain] >= level: - bb.event.fire(MsgDebug(msg, None)) print 'DEBUG: ' + msg def note(level, domain, msg, fn = None): + bb.event.fire(MsgNote(msg, None)) + if not domain: + domain = 'default' if level == 1 or verbose or debug_level[domain] >= 1: - std_note(msg) + print 'NOTE: ' + msg def warn(domain, msg, fn = None): - std_warn(msg) - -def error(domain, msg, fn = None): - std_error(msg) - -def fatal(domain, msg, fn = None): - std_fatal(msg) - -# -# Compatibility functions for the original message interface -# -def std_debug(lvl, msg): - if debug_level['default'] >= lvl: - bb.event.fire(MsgDebug(msg, None)) - print 'DEBUG: ' + msg - -def std_note(msg): - bb.event.fire(MsgNote(msg, None)) - print 'NOTE: ' + msg - -def std_warn(msg): bb.event.fire(MsgWarn(msg, None)) print 'WARNING: ' + msg -def std_error(msg): +def error(domain, msg, fn = None): bb.event.fire(MsgError(msg, None)) print 'ERROR: ' + msg -def std_fatal(msg): +def fatal(domain, msg, fn = None): bb.event.fire(MsgFatal(msg, None)) print 'ERROR: ' + msg sys.exit(1) + +def plain(msg, fn = None): + bb.event.fire(MsgPlain(msg, None)) + print msg + |