This means that some low priority libevent errors may get logged with debugging disabled when they wouldn't otherwise. In a quick check it did not appear to be chatty.
Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN. #7016
pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:without_EVENT_LOG_WARN changing 1 files +4 −0-
gmaxwell commented at 1:57 PM on November 14, 2015: contributor
-
gmaxwell commented at 1:59 PM on November 14, 2015: contributor
Not the end of the world if this isn't wanted; it's needed on Fedora 19, and (I think) Fedora 20 which some of my old test hosts are still running and I was tired of patching around it locally. Seems like a mostly harmless compatibility boost.
-
in src/httpserver.cpp:None in 4e5cb8bab2 outdated
370 | LogPrintf("libevent: %s\n", msg); 371 | else 372 | LogPrint("libevent", "libevent: %s\n", msg); 373 | +#else 374 | + // EVENT_LOG_WARN was added in 2.0.19; so in some older systems libevent warnings won't be debug-only. 375 | + LogPrint("libevent: %s\n", msg);
morcos commented at 6:43 PM on November 14, 2015:What does LogPrint without a category do? Did you mean this to be LogPrintf?
gmaxwell commented at 8:38 PM on November 14, 2015:Gah. What it doesn't to is it doesn't fail to compile; so much for type safety. Good spotting; thats what I get from changing from the always debug to always no debug at the last second. :-/
petertodd commented at 7:48 PM on November 14, 2015: contributorutACK
jonasschnelli added the label RPC on Nov 16, 2015laanwj commented at 8:54 AM on November 16, 2015: memberConcept ACK
Though what I think is interesting here is that we have a
severityargument, just not the definition ofEVENT_LOG_WARN. Looking at the changelog the old (now deprecated) name for EVENT_LOG_WARN was prefixed with an underscore. Can you try:#ifndef EVENT_LOG_WARN #define EVENT_LOG_WARN _EVENT_LOG_WARN #endifBTW: If you plan on doing any benchmarking or advanced testing, please use an up to date libevent. There have been various nasty bugs fixed over time.
gmaxwell commented at 9:16 AM on November 16, 2015: contributorIndeed, _EVENT_LOG_WARN is there and has the same definition.
aee22bf288Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN.
This uses _EVENT_LOG_WARN instead, which appears to be defined in the old versions of libevent that I have on some systems.
laanwj merged this on Nov 16, 2015laanwj closed this on Nov 16, 2015laanwj referenced this in commit dafefb7924 on Nov 16, 2015zkbot referenced this in commit b0afc4ba1d on Mar 22, 2017zkbot referenced this in commit f9f48667be on Mar 25, 2017MarcoFalke locked this on Sep 8, 2021Labels
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-04-13 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me