Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 将部分内置的日志信息等级下调 #1134

Closed
A-kirami opened this issue Aug 10, 2022 · 4 comments · Fixed by #1233
Closed

Feature: 将部分内置的日志信息等级下调 #1134

A-kirami opened this issue Aug 10, 2022 · 4 comments · Fixed by #1233
Labels
enhancement New feature or request

Comments

@A-kirami
Copy link
Contributor

是否在使用中遇到某些问题而需要新的特性?请描述:

在 NoneBot 运行中,有着许许多多的日志信息,这些日志能够帮助我们了解信息。而在 Debug 这一级别,情况就有些不太好。

在安装了几个插件之后,Debug 日志往往会出现大量的增长。这些冗余信息在大多数时候,对开发者或者用户来说是毫无价值的,反而会让真正的插件中的 Debug 信息混杂在这股信息流中,干扰开发者或者用户从中获取真正有价值的信息,提高了获取信息的成本。

描述你所需要的特性:

综上所述,我认为应当将部分内置的日志等级,从 Debug 下调到 Trace(这是比 Debug 低一级的 loguru 中的日志等级)。
让这部分内置信息依旧能够输出,但是在 Debug 时,又不至于形成干扰。

@A-kirami A-kirami added the enhancement New feature or request label Aug 10, 2022
@yanyongyu
Copy link
Member

比如哪些日志?

@A-kirami
Copy link
Contributor Author

比如哪些日志?

最常见的比如 event 不匹配时,一条消息会接着出现一片类似的日志,这点经常能够在交流群中用户的截图见到(时不时还有人问这些东西是什么问题,或者怎么关闭)。
至于具体哪些日志应该下调,我觉得这部分应该讨论决定。

@yanyongyu
Copy link
Member

yanyongyu commented Aug 10, 2022

本来debug日志的定位就是让开发者能定位具体的运行信息,event type mismatch就是为了提示开发者跳过这段处理的原因,而不是为了不想看要关掉。生产环境都不会开debug模式看这些东西。
trace日志的定位是通信层信息,例如与协议端的底层交互等等。

@yanyongyu
Copy link
Member

可能会在下个版本对日志这块再做下调整吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants