logo       

Re: level problem: msg#00001

Subject: Re: level problem

On Nov 2, 2007, at 9:49 AM, Anita Banerji wrote:

I am also finding a significant performance penalty when including DEBUG level statements even though this level is not enabled, and therefore have to comment out log4cxx code out of frequently run areas.

Any ideas on how I can fix this?

Thanks.

If you are using logstream, I believe it had a pretty high overhead on some platforms as the base std::basic_ostream<> constructor was surprisingly expensive. However, if you attempted to base logstream on something other than std::basic_ostream, then you could not match all of the basic_ostream semantics. Likely logstream will be pulled from the distribution before release since it was hard to get just right. It is only just one header file and if you want to keep using it, you would be free to continue.

Recently, the LOG4CXX_INFO and similar macros were reworked to restore use of insertion operators within the message parameter to the macro like:

LOG4CXX_INFO(logger, "Hello" << ", World");

The current implementation doesn't compile with VC6 (no problem with VC 2008 or gcc, haven't checked VC 7, 7.1 or 8) due to a compiler bug/ limitation.

If you are using logstream (and not using VC6), I'd suggest modifying the code to use the LOG4CXX_INFO macros and testing the performance.

If you are using the LOG4CXX_INFO macros and are still seeing performance issues, please create a sample program and attach it to a bug report and I'll profile it and see if there is something biting us.







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

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