Can we improve TiDB log?

Currently, TiDB log has been assigned too much functionality, such as runtime tracking, debug information and data source of offline analysis.

Maybe we can discuss how to leverage current log framework to meet all the requirement gracefully.

1 Like

Hi @xukai ! Thanks for starting this thread. I agree that we can improve logging in TiDB for various perspectives.

One perspective that I already mentioned in Turn off redundant logging in TiDB tests is that we can turn off test log when the test passed.

Generally speaking go.uber.org/zap already implements such logic in zaptest, I’ve created a pull request to port it to pingcap/log.

I’ll appreciate if you can give it a review.