diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-08-11 09:47:31 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:34 +0000 |
commit | 55c0b36e36a0d6a1f4bfdbc076bc0d8eac15a2c4 (patch) | |
tree | 0e0019ff29a9c5025a5e06ea550353c5fe923081 /bitbake | |
parent | ecc68fa4fbb579e97ea45156e79a293b073697a0 (diff) | |
download | openembedded-core-55c0b36e36a0d6a1f4bfdbc076bc0d8eac15a2c4.tar.gz openembedded-core-55c0b36e36a0d6a1f4bfdbc076bc0d8eac15a2c4.tar.bz2 openembedded-core-55c0b36e36a0d6a1f4bfdbc076bc0d8eac15a2c4.zip |
Add pending deprecation warnings to the bb.msg functions
(Bitbake rev: 60293a42b5500b6139bcd912bf294f862ef9936b)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/msg.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py index bd01d79028..e495ee6e46 100644 --- a/bitbake/lib/bb/msg.py +++ b/bitbake/lib/bb/msg.py @@ -26,6 +26,7 @@ import sys import logging import collections from itertools import groupby +import warnings import bb import bb.event @@ -109,6 +110,8 @@ def set_debug_domains(domainargs): # def debug(level, msgdomain, msg, fn = None): + warnings.warn("bb.msg.debug will soon be deprecated in favor of the python 'logging' module", + PendingDeprecationWarning, stacklevel=2) level = logging.DEBUG - (level - 1) if not msgdomain: logger.debug(level, msg) @@ -116,10 +119,13 @@ def debug(level, msgdomain, msg, fn = None): loggers[msgdomain].debug(level, msg) def plain(msg, fn = None): - logger.log(logging.INFO + 1, msg) + warnings.warn("bb.msg.plain will soon be deprecated in favor of the python 'logging' module", + PendingDeprecationWarning, stacklevel=2) logger.plain(msg) - + def note(level, msgdomain, msg, fn = None): + warnings.warn("bb.msg.note will soon be deprecated in favor of the python 'logging' module", + PendingDeprecationWarning, stacklevel=2) if level > 1: if msgdomain: logger.verbose(msg) @@ -132,18 +138,24 @@ def note(level, msgdomain, msg, fn = None): loggers[msgdomain].info(msg) def warn(msgdomain, msg, fn = None): + warnings.warn("bb.msg.warn will soon be deprecated in favor of the python 'logging' module", + PendingDeprecationWarning, stacklevel=2) if not msgdomain: logger.warn(msg) else: loggers[msgdomain].warn(msg) def error(msgdomain, msg, fn = None): + warnings.warn("bb.msg.error will soon be deprecated in favor of the python 'logging' module", + PendingDeprecationWarning, stacklevel=2) if not msgdomain: logger.error(msg) else: loggers[msgdomain].error(msg) def fatal(msgdomain, msg, fn = None): + warnings.warn("bb.msg.fatal will soon be deprecated in favor of raising appropriate exceptions", + PendingDeprecationWarning, stacklevel=2) if not msgdomain: logger.critical(msg) else: |