OpenAtomFoundation / pika

Pika is a Redis-Compatible database developed by Qihoo's infrastructure team.
BSD 3-Clause "New" or "Revised" License
5.76k stars 1.19k forks source link

Introduce Granular Logging Levels to Pika #2734

Closed cheniujh closed 2 weeks ago

cheniujh commented 3 weeks ago

Which PikiwiDB functionalities are relevant/related to the feature request?

No response

Description

给Pika的配置文件增加日志输出等级,提供打印日志量的控制。 比如:Pika目前的日志会打印所有的连接活动,而在一些客户端频繁使用短连接的情况下(客户端高频连接,断开,再连接),pika打印的glog日志量会比较大,甚至能以G计,请见issue:https://github.com/OpenAtomFoundation/pika/issues/2687

Add a log output level to Pika's configuration file to control the amount of printed logs. For example, Pika currently logs all connection activities, and in cases where clients frequently use short connections (clients connecting, disconnecting, and reconnecting at high frequency), the volume of glog logs printed by Pika can be quite large, potentially reaching gigabytes. Please refer to the issue:https://github.com/OpenAtomFoundation/pika/issues/2687

Proposed solution

可以增加一些日志等级调控,比如在某个level下,pika不打印连接活动,而只打印其他必要的日志.

It would be beneficial to add some log level controls, such as having Pika not log connection activities at a certain level and only print other necessary logs..

Alternatives considered

none