Merge bitcoin/bitcoin#34088: log: Use __func__ for -logsourcelocations
facd3d56cclog: Use `__func__` for -logsourcelocations (MarcoFalke) Pull request description: The `-logsourcelocations` option was recently changed to print the full function signature, as a side-effect of moving toward `std::source_location` internally. This is fine, but at least for me, it makes debugging functional test failures harder, because the log is just so massively verbose, with questionable benefit. I think the historically used file name, line number, and plain `__func__` name are more than sufficient for `-logsourcelocations`. So switch back to using that. For reference, a verbose log may look like: ``` ... node0 2025-12-17T07:28:37.528146Z [init] [checkqueue.h:147] [CCheckQueue<T, R>::CCheckQueue(unsigned int, int) [with T = CScriptCheck; R = std::pair<ScriptError_t, std::__cxx11::basic_string<char> >]] Script verificatio n uses 1 additional threads ... ``` I don't think there is value in printing stuff, like the (anon) namespace, the class template args, or the functionn (template) args. The following should be more than sufficient: ``` ... node0 2025-12-17T09:45:57.017122Z [init] [checkqueue.h:147] [CCheckQueue] Script verification uses 1 additional threads ... ACKs for top commit: ajtowns: ACKfacd3d56cc-- those long signatures are terrible stickies-v: ACKfacd3d56ccTree-SHA512: 22fd1f0074fc6e85754967f9219659f57c905005a2bea9176f0b439abec324d7e6c2f875c8951934a3b11ef7e9d7e38d5d5d307e2bd1e000bc27ee85635cd668
This commit is contained in:
4 files changed
+53
-29
No files matched your search
@@ -0,0 +1,2 @@
|
||||
- When `-logsourcelocations` is enabled, the log output now contains just the
|
||||
function name instead of the entire function signature. (#34088)
|
||||
Reference in new issue
Block a user