[fix] specify PendingDeprecationWarning, not default UserWarning
bzr revid: xmo@tinyerp.com-20100302095809-v2tdjb22ogok3y73
This commit is contained in:
parent
a7d00eb5f3
commit
9150c0695f
|
@ -211,12 +211,14 @@ def init_logger():
|
||||||
class Logger(object):
|
class Logger(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
warnings.warn("The netsvc.Logger API shouldn't be used anymore, please "
|
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__()
|
super(Logger, self).__init__()
|
||||||
|
|
||||||
def notifyChannel(self, name, level, msg):
|
def notifyChannel(self, name, level, msg):
|
||||||
warnings.warn("notifyChannel API shouldn't be used anymore, please use "
|
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
|
from service.web_services import common
|
||||||
|
|
||||||
log = logging.getLogger(tools.ustr(name))
|
log = logging.getLogger(tools.ustr(name))
|
||||||
|
|
Loading…
Reference in New Issue