草庐IT

BBProposalGenerator

全部标签

Python:如何抑制来自第三方库的日志记录语句?

这个问题在这里已经有了答案:HowdoIdisablelogmessagesfromtheRequestslibrary?(13个答案)关闭6年前。我的日志设置看起来像importrequestsimportlogginglogging.basicConfig(level=logging.INFO)logger=logging.getLogger('BBProposalGenerator')当我运行它时,我得到的日志为INFO:requests.packages.urllib3.connectionpool:StartingnewHTTPconnection(1):localhostI

Python:如何抑制来自第三方库的日志记录语句?

这个问题在这里已经有了答案:HowdoIdisablelogmessagesfromtheRequestslibrary?(13个答案)关闭6年前。我的日志设置看起来像importrequestsimportlogginglogging.basicConfig(level=logging.INFO)logger=logging.getLogger('BBProposalGenerator')当我运行它时,我得到的日志为INFO:requests.packages.urllib3.connectionpool:StartingnewHTTPconnection(1):localhostI