XML-RPC server logging

拜拜、爱过 提交于 2019-12-06 04:39:38

Ok, I haven't properly read you code. Now I see that in this structure it is impossible to do what I proposed. What I would do here is to prepare custom logger at the module level and retrieve it by name in LoggingSimpleXMLRPCRequestHandler.

Your are doing part of it in "main": configuring the logger with name 'Log'. Then retrieve that logger in LoggingSimpleXMLRPCRequestHandler:

class LoggingSimpleXMLRPCRequestHandler(SimpleXMLRequestHandler):
    def __init__(self):
        self.logger = logging.getLogger('Log')

and in LoggingSimpleXMLRPCRequestHandler methods use self.logger instead of logger.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!