mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-13 15:33:51 +02:00
c5ec2d5313logging: replace FormatLogStrInPlace with Format (stickies-v)3b92ec2036logging: replace BufferedLog with log::Entry (stickies-v)8115001cd4logging: pass log::Entry through to logging functions (stickies-v)b414913c73util: add timestamp and thread_name to log::Entry (stickies-v)8a55b17751util: make SourceLocation constructor explicit (stickies-v) Pull request description: Preparatory work to enable struct-based logging for kernel (#34374), but I think it's a mild improvement by itself too. #34465 introduced `util::log::Entry`. This PR updates some internal functions and structs to make better use of that new plumbing. Mostly a refactor, except for very minor timing differences for `timestamp` and `mocktime` which are now uniformly captured at `Entry` generation. ACKs for top commit: maflcko: review ACKc5ec2d5313🚐 ryanofsky: Code review ACKc5ec2d5313. Just suggested changes since last review: adding (void) std::move, making SourceLocation constructor explicit, dropping BufferedLog struct. Overall PR is a nice code simplification, and I don't think it has downsides other than buffered logs now containing [ignored](https://github.com/bitcoin/bitcoin/pull/34865#discussion_r3054379230) `should_ratelimit` fields, which can be fixed in a followup by separating log entries from log options. sedited: ACKc5ec2d5313Tree-SHA512: 3943f380a426b2c1b405226f231db51548c737467a278936b36a4cc738e01a790258f0886817d7caa1dbba7874f2e7f9ad93c36a137fa35f721f2d988b9863aa