pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.04k stars 5.82k forks source link

Tracking issue for unifying log library #24190

Open SabaPing opened 3 years ago

SabaPing commented 3 years ago

This issues tracking the progress for "Unify Log Library for Golang Projects"

What problem does this PR solve?

The primary goal is to clean up the logging component. TiDB (and other golang projects) depends on two different third part log components, which are logrus and zap. This creates unnecessary complexity. In addition, there are some other logging flaws in code.

Task Check List

Release note

SabaPing commented 3 years ago

Doc Tasks:

tisonkun commented 3 years ago

Hi @SabaPing , what is the next step you would like to go?

If you don't have time to create a PR, you can create subtask issue on BR / PD / TiUP and describe task you'd like to do. And hopefully we can take some of them.

tisonkun commented 3 years ago

@SabaPing BR is merged into TiDB, you can take a look whether we should change something in the plan.

SabaPing commented 3 years ago

https://github.com/pingcap/tidb/pull/23534 caused an issue of unwanted GRPC logs. And it fixed by pr: https://github.com/pingcap/tidb/pull/25454.

SabaPing commented 3 years ago

23534 caused an issue https://github.com/pingcap/tidb/issues/25716 that some slow log file configs not working. This made unexpected disk usage.

Fixed by pr: https://github.com/pingcap/tidb/pull/27625

SabaPing commented 3 years ago

There is a pr that enables runtime logger configuration: session: add session var to update global logger max days