tikv / client-go

Go client for TiKV
Apache License 2.0
274 stars 215 forks source link

Logrus instances and override #59

Open maoueh opened 3 years ago

maoueh commented 3 years ago

In our codebase, we have 2 to 3 instances of TiKV in certain circumstances. All of them are currently logging through the logrus standard logger.

It would be preferable if each tikv-client instance had his own logger attached to it so it would be possible to configure them differently based on the instance directly.

Every logger could use the standard logger by default and a new method could enable configure a different logger by default.

I'm opening the issue here to get a feeling if this would be an accept PR on this repository, at some point in time, I could take the issue and make the necessary code changes.

disksing commented 3 years ago

@maoueh I think it is a great idea!