-
Notifications
You must be signed in to change notification settings - Fork 130
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
switch from juju/errors to pingcap/errors #360
Comments
Please update the related vendored codes. @GregoryIan |
These changes are in 2.1: you may need to wait for the stable 2.1 release |
tidb-binlog has two LGPL dependencies: In TiDB the replacement is |
Thanks for looking into this. I am trying out the zap logger now also :). I much prefer to leave log rotation to an external tool. In general I prefer to log to stdout and leave it up to the deployment details what happens next. Assuming logging to the machine where it is running is not cloud friendly. We would want the option to ship the log elsewhere. Still its just as possible for the deployment to redirect stdout to a file and use a log rotation tool. |
Would we need to coordinate with the ansible based deployment to see how we can have that deployment ensure log rotation? @LinuxGit |
Although in the long-run I do think it is best to avoid coupling log rotation to the binlog process, I did see that zap mentions integration with lumberjack. |
Applied lumberjack's recommendation on how to do time-based rotation, so Lines 90 to 103 in 8f996ce
The next issue is that The only feature used is
|
Thanks for figuring out the log rotation! Replacing a dependency is perfectly legal. We use Gopkg to replace pkg/errors, but you could do the same to replace juju/errors: https://github.com/pingcap/tidb/blob/master/Gopkg.toml#L101. We could also send a pull request to the clickhouse driver. pingcap/errors offers stack traces, which could be very helpful. |
Thanks gregwebs |
I tried to do this switch, but what held me back is that tidb is vendored and still using juju/errors, including some of its esoteric APIs.
The latest version of tidb has switched to using pingcap/errors. Similarly, pd has switched to pkg/errors.
So I am hoping that the vendored tidb can be updated.
One of the main motivations for me to prompt tidb-binlog to do this change is that juju/errors is LGPL code, which makes proper distribution of tidb-binlog more difficult.
The text was updated successfully, but these errors were encountered: