logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattias Brändström <thebra...@brasse.org>
Subject Re: The logging macros
Date Thu, 26 Aug 2004 13:10:04 GMT

(For some reason I have messed up my inbox. This messages is intended to 
be a reply to Alex message)

The reason I was asking about the macros was that I am a little 
concerned about the performance impact of making the logging calls all 
the time. I sometimes want to sprinkle my code with debug messages and 
leave them there. If I can recompile with LOG_DEBUG types macros 
disabled I won't have to worry about those debug messages stealing 
resources from the rest of the application. Should I worry about this if 
I am using log4cxx?

:.:: mattias

Mattias Brändström wrote:
> Hello!
> I was looking at the logging macros in log4cxx and I have one question. 
> Is there any particular reason why the macros aren't enclosed in an #if 
> like this:
> #if !defined(LOG4CXX_DISABLE_DEBUG)
> macro definition here
> #endif
> I suspect that there is a reason for this, I just can't figure it out on 
> my own. :-) So please enlighten me.
> :.:: mattias

View raw message