ajtowns
commented at 4:45 PM on March 11, 2026:
contributor
ShrinkDebugFile now takes the logging mutex for its entire run; though it's only called in init so shouldn't have any races in the first place.
Adds a NO_RATE_LIMIT tag that can be used with info/warning/error logs to avoid rate-limiting. This allows LogPrintLevel_ to be restricted to being an internal API.
The GetLogCategory function is moved out of the global namespace.
ShouldLog is split into separate ShouldDebugLog and ShouldTraceLog so that filtering checks are somewhat more enforced via function signature checks.
Redundant LogAcceptCategory function is removed.
More files are pointed at util/log.h instead of logging.h.
DrahtBot added the label Refactoring on Mar 11, 2026
DrahtBot
commented at 4:46 PM on March 11, 2026:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
#31260 (scripted-diff: Type-safe settings retrieval by ryanofsky)
#29256 (log, refactor: Allow log macros to accept context arguments by ryanofsky)
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.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
ajtowns
commented at 5:08 PM on March 11, 2026:
contributor
DrahtBot added the label Needs rebase on Mar 20, 2026
ajtowns force-pushed on Mar 20, 2026
DrahtBot removed the label Needs rebase on Mar 20, 2026
ajtowns force-pushed on Mar 24, 2026
DrahtBot added the label Needs rebase on Mar 31, 2026
ajtowns force-pushed on Apr 2, 2026
DrahtBot removed the label Needs rebase on Apr 2, 2026
DrahtBot added the label Needs rebase on Apr 9, 2026
ajtowns force-pushed on Apr 9, 2026
DrahtBot removed the label Needs rebase on Apr 9, 2026
DrahtBot added the label Needs rebase on Apr 23, 2026
util/stdmutex: Drop StdLockGuard904c0d07bb
logging: Protect ShrinkDebugFile by m_cs
We should not be logging while shrinking the debug file, so make sure
that's true by using our mutex.
b408c2cde2
util/log: Provide util::log::NO_RATE_LIMIT to avoid rate limitsaae93d033a
util/log: Rename LogPrintLevel_ into detail_ namespace
After the previous commit, LogPrintLevel_ is only used to implement
other macros.
8d1edeb3fa
logging: Move GetLogCategory into Logger classf7cdb5e36d
util/log, logging: Provide ShouldDebugLog and ShouldTraceLog instead of a generic ShouldLog12035b9a73
scripted-diff: logging: Drop LogAcceptCategory
-BEGIN VERIFY SCRIPT-
sed -i 's/LogAcceptCategory(\(.*\), [a-zA-Z:]*::Level::Debug)/util::log::ShouldDebugLog(\1)/g' $(git grep -l LogAcceptCategory -- '*.cpp')
sed -i 's/LogAcceptCategory(\(.*\), [a-zA-Z:]*::Level::Trace)/util::log::ShouldTraceLog(\1)/g' $(git grep -l LogAcceptCategory -- '*.cpp')
sed -i '/Return true if log accepts specified category/,/^$/d' src/logging.h
-END VERIFY SCRIPT-
8bbf99479b
IWYU fixes
Add missing includes of logging.h in preparation for the next commit,
switching to util/log.h. Also removes some unnecessary util/check.h
includes that CI complains about.
2834ee6a23
logging: use util/log.h where possible
Replace usage of logging.h with util/log.h where it
suffices.
2077e57eb0
ajtowns force-pushed on Apr 23, 2026
DrahtBot removed the label Needs rebase on Apr 23, 2026
DrahtBot added the label CI failed on Apr 23, 2026
DrahtBot removed the label CI failed on Apr 23, 2026
sedited approved
sedited
commented at 10:57 AM on May 11, 2026:
contributor
lgtm ACK2077e57eb0107acfeb09846899c7e7ae7f77014e
This is bit of a laundry list, and the conflicts are unfortunate, but better to get this done sooner rather than later.
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-05-12 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me