logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: The logging macros: msg#00021

apache.logging.log4cxx.user

Subject: Re: The logging macros


I suspect you are thinking in an "old fashion" way where log levels are determined by #defines at preprocessing time. Log4cxx does this based on configuration file settings.
If you look at the logging macros you'll see:


if (logger->isEnabledFor(level)) {

...

}


This way, the desired log level is set at runtime without a need for recompiling (or even having access to) the source code. Of course, there is a small performance price to pay.


Alex


Mattias Brändström <thebrasse@xxxxxxxxxx> wrote on 08/20/2004 04:37:47 AM:

> 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

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo