-
Notifications
You must be signed in to change notification settings - Fork 803
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
Generalize logger usage between src and binary folders #3923
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…to client-logger-separation
…reumjs-monorepo into client-logger-separation
…to client-logger-separation
…to client-logger-separation
Some loose thoughts while hovering through the changes here and also through the code base from the existing implementation (didn't have a closer look if you are already moving in some directions mentioned here, so these are just my thoughts, either as a confirmation or an implementation idea).
I guess Action Item, especially from 5. and 6., might be: maybe take a one-day-break and rather go a bit deeper into the logger space as a whole, see what's there, see what others are suggesting and the like. 🙂 Then it would be great if you can provide the team with some overview what's there and what might be appropriate to choose! Wow. A lot to think here. 🙂 This was useful for myself as well though. Need to especially think more about this "library mode" and an associated API and how to structure. |
…js/ethereumjs-monorepo into client-logger-separation
…to client-logger-separation
this.info = this.info.bind(this) | ||
this.warn = this.warn.bind(this) | ||
this.error = this.error.bind(this) | ||
this.debug = this.debug.bind(this) |
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.
I am not getting what is happening here, think this can be removed (binding this
to this
, generally, binding should be avoided)?
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.
There was somewhere in the client source code where the logger's info
or debug
function was be assigned to a new variable and used through it, which was causing issues with the new class implementation because this.logger
was undefined when the function is used like that. Will double check this.
…to client-logger-separation
…to client-logger-separation
…reumjs-monorepo into client-logger-separation
This change looks into creating a general logger interface and implementing two different versions of loggers, a console and winston one, and it removes the winston imports from the
src
directory and brings them tobin
. Also see #3922.