common.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:tintri-python-sdk 作者: Tintri 项目源码 文件源码
def __init_logging(self):
        try: # To avoid "No handler found" warnings for Python version < 2.7
            from logging import NullHandler
        except ImportError:
            class NullHandler(logging.Handler):
                def emit(self, record): pass

        self.__logger = logging.getLogger(self.__logger_name)
        self.__logger.addHandler(NullHandler()) # defaults to the do-nothing NullHandler
        #self.__logger.setLevel(logging.INFO) # defaults to logging.INFO

        # Logger test messages
        #self.__logger.debug('debug message')
        #self.__logger.info('info message')
        # self.__logger.warn('warn message')
        # self.__logger.error('error message')
        # self.__logger.critical('critical message')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号