-
Notifications
You must be signed in to change notification settings - Fork 37.7k
scripted-diff: LogPrint -> LogDebug #30750
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
ACK fa6b80b
As already addressed in PR description, there are a fair amount of conflicts with other PRs, but the fact that it's a trivial scripted-diff makes it very easy to incorporate this change with git rebase --exec
.
It wastes review cycles, because reviewers sometimes point out that it is deprecated.
This alone is worth the (again, trivial) merge conflicts imo.
-BEGIN VERIFY SCRIPT- sed -i 's/\<LogPrint\>/LogDebug/g' $( git grep -l '\<LogPrint\>' -- ./contrib/ ./src/ ./test/ ':(exclude)src/logging.h' ) -END VERIFY SCRIPT-
fa21f9f
to
faa7db7
Compare
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.
ACK fa09cb4
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.
utACK fa09cb4
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.
ACK fa09cb4
The merge conflicts for #28521 were indeed easy to handle. |
…ct logging 06443b8 net: clarify if we ever sent or received from peer (Sjors Provoost) 1d01ad4 net: add LogIP() helper, use in net_processing (Sjors Provoost) 937ef9e net_processing: use CNode::DisconnectMsg helper (Sjors Provoost) ad22442 net: additional disconnection logging (Sjors Provoost) Pull request description: While debugging unexpected disconnections, possibly related to #28331, I found some additional [net] logging to be useful. All cases where we disconnect now come with a log message that has the word `disconnecting`: * all calls to `CloseSocketDisconnect()` log `disconnecting peer=…` * wherever we set `pnode->fDisconnect = true;` * for all `InactivityCheck` cases (which in turn sets `fDisconnect`) * replaces "dropping" with "disconnecting" in `Network not active, dropping peer=…` A few exceptions are listed here: #28521 (comment) I changed `CloseSocketDisconnect()` to no longer log `disconnecting`, and instead have all the call sites do so. This PR introduces two helper functions on `CNode`: `DisconnectMsg` and `LogIP`. The second and third commit use these helpers in `net_processing.cpp` so these disconnect messages are more consistent now (e.g. some didn't log the IP). No new messages are added there though. The `LogIP()` helper is rarely used outside of a disconnect event, but it's available for future use. Any `LogPrint` this PR touches is replaced with `LogDebug` (superseded by #30750), and every `LogPrintf ` with `LogInfo`. ACKs for top commit: davidgumberg: reACK 06443b8 vasild: ACK 06443b8 danielabrozzoni: ACK 06443b8 hodlinator: ACK 06443b8 Tree-SHA512: 525f4c11568616e1d48455a3fcab9e923da7432377fe9230468c15403d2e9b7ce712112df8fbd547cfec01dce0d1f26107cfc1b90f78cfc1fe13e08d57b08464
LogPrint
has many issues:-printtoconsole
actually control what and where something is logged.LogDebug
, according to the dev notes.InitHTTPServer
)Fix all issues by removing the deprecated alias.
I checked all conflicting pull requests and at the time of writing there are no conflicts, except in pull requests that are marked as draft, are yet unreviewed, or are blocked on feedback for other reasons. So I think it is fine to do now.