-
Notifications
You must be signed in to change notification settings - Fork 496
fix: standardize error logs to use %e token #3261
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
base: main
Are you sure you want to change the base?
Conversation
@gulshanpr: Hi Gulshan. Wish to ask if the PR has been tested locally. Please attend the upcoming js-libp2p calls on Wednesday. We will work out a clear plan on ensuring we are meeting the requisite needs in reference to js-libp2p. CCing @dhuseby. |
so to prove this PR, do i need to add test along with it or running |
Thanks for opening this PR. As it just changes log lines there's no need to add a test. Unfortunately there have been disruptive changes in main as part of prep for the v3 release - please can you fix the merge conflicts here. |
hi @achingbrain i've fixed the merge conflicts, can you review it now? |
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 have done a partial review but this PR is full of merge conflicts that have not been resolved and instead added as-is to the PR.
I cannot continue this review until this PR will apply to main cleanly.
General comments are:
- Where there was previously
this.log(err)
, instead of changing it tothis.log('%e', err)
, add some more context, e.g.this.log('error while Xing the Y - %e', err)
. - Do not change the casing of log messages, in this codebase error logging is lowercase and messages passed to Error instances is sentence case
8324918
to
7fee9d5
Compare
Hey @achingbrain,
could you pls review it now |
Title
Standardize error logs to use %e token
Description
Replaced old %s/%o error logging with the %e token across the codebase for consistency.
Issue #3161
Notes & open questions
Change checklist