是否可以抑制python中的信息记录输出?
我想抑制特定的信息输出:
INFO Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
我知道可以抑制警告,请参阅,但似乎不适用。这个问题是一般的,不应取决于上下文,在这种情况下, matplotlib
混乱了
并可以使用另一种方式避免它。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题。我以自己的方式使用了登录,并出于开发原因将其设置为调试。
我还使用了matplotlib,这只是我的调试级别的定义,我开始看到很多不是我的调试消息。
我最好的猜测是导入日志记录和设置日志级别高于信息。
I've had the same issue. I used logging in my own terms and set it to DEBUG for development reasons.
I also used matplotlib and it just took my debug level definition and I started to see a whole lot of debug messages which were not mine.
My best guess would be to import logging and setting the log level higher than info.