-
Notifications
You must be signed in to change notification settings - Fork 28
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 logrusctx
instead of logrus
on task
#716
Conversation
I have a couple of questions.
|
See #423 (review) for context (pun intended) on the introduction of |
I'm still missing this, I did read the body. To me looks like this lets the logging write out to some buffer that we could then print out to a user via an API call (this is to help enable that correct?), but I see no changes that actually enable this, all is see is
Should this just go with the changes which utilize the feature?1
Maybe I'm missing some hacky-ness somewhere but I think that swapping out the logger should be the easiest update/rewrite/refactor that we could do for this codebase? Footnotes
|
I think this is a step in the right direction. The internal task package is going to be used (hopefully) in several different contexts: in the CLI tool, in TPI and in the server. These all have different logging requirements. By adding |
Yes, this pull request just enables the possibility of injecting a custom logger into the context, but doesn't introduce any example.
I would explicily like to separate both changes for pull requests like #716 (this) and #710, so they can be easily cherry-picked to the main branch and separated from commits related to the LEO server implementation.
Sure! What could possibly go wrong? 😅 |
The modifications introduced with this pull request can be used to provide detailed operation status, to avoid a a “The Cloudformation” experience where users have no insight on the operation progress.
Uses github.com/0x2b3bfa0/logrusctx, which is in turn based on github.com/juju/zaputil/zapctx, mentioned by @tasdomas in a casual conversation, unsuspecting of my implementation impetus.
Use case