首页 > TAG信息列表 > AppLogger
logging 日志封装
记录一种日志封装 logger.py import os import logging class AppLogger: def __init__(self, name, level=logging.DEBUG, stdout=False, tofile=None): # 创建一个logger self.logger = logging.Logger(name) self.logger.setLevel(level)logging 日志封装
记录一种日志封装 logger.py import os import logging class AppLogger: def __init__(self, name, level=logging.DEBUG, stdout=False, tofile=None): # 创建一个logger self.logger = logging.Logger(name) self.logger.setLevel(level)