-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
use interface instead *logrus.Logger in plugin klogrus #619
Conversation
Technically this is a "major" change since the input type changed. What do you think about making this a minor change by adding a new API, NewFieldLogger? |
Sure, will work on it |
done @twmb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks
Can you squash all of these changes into one commit? Also still need the period dropped on that doc line I commented on |
squash done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice thanks, I'll release this likely today
I haven't forgotten, just got behind. Why changes today? |
I had some free time :) |
Apologies on the delay, lgtm, I'll tag imminently. |
Released as plugin/klogrus/v1.1.0. I think v1.10.0 was tagged incorrectly with an @ rather than a /, so at least v1.1.0 is correct. |
Hello
We use some wrappers around
*logrus.Logger
and we don't want to write a wrapper each time we need to set the kafka loggerInstead, since most of the time we use
logrus.FieldLogger
with some extra methods, I decided to send this small contribution where we can use this minimal interfaceThe result is still compatible with logrus, but on steroids.
I was thinking in use the pure
logrus.FieldLogger
and store the log level (using two constructors, for instance) but I think we need to react to possible changes in the log level in runtime. This solution is cleanerAlso I add one test based on kslog plugin.
Enjoy