ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
主文件中: ```python # Level: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET import logging logging.basicConfig(level=logging.DEBUG, filename="mylog.log", format='%(asctime)s %(levelname)s %(filename)s %(funcName)s %(lineno)d %(message)s', filemode='w') logger = logging.getLogger(__name__) # logger.getLogger("module_name").setLevel(logging.CRITICAL) ``` 在其他文件: ```py import logging logger = logging.getLogger(__name__) ```