[fix] specify PendingDeprecationWarning, not default UserWarning

bzr revid: xmo@tinyerp.com-20100302095809-v2tdjb22ogok3y73
This commit is contained in:
Xavier Morel 2010-03-02 10:58:09 +01:00
parent a7d00eb5f3
commit 9150c0695f
1 changed files with 4 additions and 2 deletions

View File

@ -211,12 +211,14 @@ def init_logger():
class Logger(object):
def __init__(self):
warnings.warn("The netsvc.Logger API shouldn't be used anymore, please "
"use the standard `logging.getLogger` API instead")
"use the standard `logging.getLogger` API instead",
PendingDeprecationWarning, stacklevel=2)
super(Logger, self).__init__()
def notifyChannel(self, name, level, msg):
warnings.warn("notifyChannel API shouldn't be used anymore, please use "
"the standard `logging` module instead")
"the standard `logging` module instead",
PendingDeprecationWarning, stacklevel=2)
from service.web_services import common
log = logging.getLogger(tools.ustr(name))