更改此脚本中的日志级别(Changing the Log level in this script)

编程入门 行业动态 更新时间:2024-10-28 04:28:30
更改此脚本中的日志级别(Changing the Log level in this script)

我正在使用此源代码中的脚本。我想更改Web服务器显示的日志级别,只显示ERROR日志。 在371行,我做了改变

'rootLogger.setLevel(logging.ERROR)'

但我仍然在网页上有调试和信息消息。有人看看,告诉我我做错了什么。

谢谢!

I am using the script from this source.I want to change the log level of what the web server is displaying to only have ERROR logs displayed. In the line 371 i have made the change

'rootLogger.setLevel(logging.ERROR)'

but I still have Debug and Info messages in the web page.Can someone have a look and tell me what I am doing wrong.

Thank you!

最满意答案

如果你看第136行它会说所有内容都会被记录,你应该设置客户端级别。

也许您应该在代码块下面显示客户端代码中的级别。

If you look at line 136 it says that everything will get logged and that you should set levels client side.

Maybe you should set the level in the clientcode as is shown below the code block.

更多推荐

本文发布于:2023-04-28 00:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329236.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   级别   日志   Changing   level

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!