Skip to content

Conversation

@gmaxwell
Copy link
Contributor

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.

@gmaxwell
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does LogPrint without a category do? Did you mean this to be LogPrintf?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

utACK

@laanwj
Copy link
Member

laanwj commented Nov 16, 2015

Concept ACK

Though what I think is interesting here is that we have a severity argument, just not the definition of EVENT_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
#endif

BTW: 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
Copy link
Contributor Author

Indeed, _EVENT_LOG_WARN is there and has the same definition.

This uses _EVENT_LOG_WARN instead, which appears to be defined in the
 old versions of libevent that I have on some systems.
@laanwj laanwj merged commit aee22bf into bitcoin:master Nov 16, 2015
laanwj added a commit that referenced this pull request Nov 16, 2015
aee22bf Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN. (Gregory Maxwell)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants