Re: [Log4cplus-devel] LOG4CPLUS_DEBUG expansion fails when DEBUG macro is defined
Logging Framework for C++
Brought to you by:
wilx
From: Václav Z. <vha...@gm...> - 2012-09-06 09:36:04
|
On 5 September 2012 21:53, Chernyshev Vyacheslav wrote: > Hello. > > While testing log4cplus with default-generated Xcode project on OS X, > I've found out that any usage of LOG4CPLUS_DEBUG immediately produces > very strange compilation errors. After examing this problem I've noticed > that Xcode defines DEBUG macro to 1 for debug builds. As LOG4CPLUS_DEBUG > is defined like: > LOG4CPLUS_MACRO_BODY (logger, logEvent, DEBUG) > it is obvious that expanding this macro will fail later. > > I have fixed it this way locally: https://gist.github.com/3643384 It > somewhat uglifies the code, but predefined DEBUG_LOG_LEVEL macro is much > less common than DEBUG/NDEBUG macro pairs. Thank you for the patch. I have applied it together with some small additional changes. -- VZ |