-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Replace logrus with zap #43
Conversation
This does not look like I am able to redirect speed's output but rather copy log messages to extra writer if I read it right. I would like to be able to redirect all speed's output to syslog when debug is turned on, so I can find it along with my app logs. More than that, I very much like structured logging and this is awesome thing to have (kudos). I would love to be able to redirect speed into journald along with my application logs including all the extra fields. But overall, definitely good step foreward, two dependencies instead of one! Big up. Edit: The reason why I want to get rid of stdout is indeed - daemon mode. It will be eventually closed anyway, the only proper way of logging for daemons is journald these days (or syslog on older platforms). And I am writing a tiny daemon app with your lovely library :-) |
@lzap this allows you to specify the |
92302b7
to
4d89b58
Compare
@lzap I have added tests to demonstrate usage for the functions. Please feel free to add comments :) |
7174efc
to
87d55e9
Compare
@lzap ping |
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.
Looks good to me Suyash.
This adds a couple of functions,
speed.AddLogWriter(io.Writer)
andspeed.SetLogWriters(...io.Writer)
to allow clients to modify the writers logs are written to.@lzap @natoscott PTAL.