[imp] add PendingDeprecationWarning to netsvc.Logger API

bzr revid: xmo@tinyerp.com-20100302093314-xos9vi0le2f249id
This commit is contained in:
Xavier Morel 2010-03-02 10:33:14 +01:00
parent e272ebf713
commit ea5cf5989f
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import threading
import time
import xmlrpclib
import release
import warnings
class Service(object):
""" Base class for *Local* services
@ -211,8 +212,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")
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")
from service.web_services import common
log = logging.getLogger(tools.ustr(name))