Thanks for the help.
I've checked out the svn head to get the macros that allow me to use the
insertion operator so that I can follow your advice. However, the
install fails. Any help would be greatly appreciated.
Interestingly I checked out yesterday and twice today in order to try a
couple of times and I got different failure from yesterdays check out.
Thanks,
Anita
My system:
uname -a
Linux linux-lfns 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 i686
i686 i386 GNU/Linux
ant -version
Apache Ant version 1.7.0 compiled on December 13 2006
java -version
java version "1.6.0_01"
The last part of the output from the install:
[exec] !!!FAILURES!!!
[exec] Test Results:
[exec] Run: 307 Failures: 5 Errors: 4
[exec]
[exec]
[exec] 1) test: TimeBasedRollingTest::test1 (E)
[exec] uncaught exception of type log4cxx::helpers::IOException
[exec] - IO Exception : status code = 2
[exec]
[exec]
[exec] 2) test: TimeBasedRollingTest::test2 (E)
[exec] uncaught exception of type log4cxx::helpers::IOException
[exec] - IO Exception : status code = 2
[exec]
[exec]
[exec] 3) test: TimeBasedRollingTest::test3 (F) line: 244
/usr/local/src/apache-log4cxx/src/test/cpp/rolling/timebasedrollingtest.
cpp
[exec] equality assertion failed
[exec] - Expected: 1
[exec] - Actual : 0
[exec]
[exec]
[exec] 4) test: TimeBasedRollingTest::test4 (E)
[exec] uncaught exception of type log4cxx::helpers::IOException
[exec] - IO Exception : status code = 2
[exec]
[exec]
[exec] 5) test: TimeBasedRollingTest::test5 (E)
[exec] uncaught exception of type log4cxx::helpers::IOException
[exec] - IO Exception : status code = 2
[exec]
[exec]
[exec] 6) test: TimeBasedRollingTest::test6 (F) line: 413
/usr/local/src/apache-log4cxx/src/test/cpp/rolling/timebasedrollingtest.
cpp
[exec] equality assertion failed
[exec] - Expected: 1
[exec] - Actual : 0
[exec]
[exec]
[exec] 7) test: AsyncAppenderTestCase::closeTest (F) line: 155
/usr/local/src/apache-log4cxx/src/test/cpp/asyncappendertestcase.cpp
[exec] equality assertion failed
[exec] - Expected: 1
[exec] - Actual : 0
[exec]
[exec]
[exec] 8) test: AsyncAppenderTestCase::test2 (F) line: 175
/usr/local/src/apache-log4cxx/src/test/cpp/asyncappendertestcase.cpp
[exec] equality assertion failed
[exec] - Expected: 1
[exec] - Actual : 0
[exec]
[exec]
[exec] 9) test: AsyncAppenderTestCase::test3 (F) line: 199
/usr/local/src/apache-log4cxx/src/test/cpp/asyncappendertestcase.cpp
[exec] equality assertion failed
[exec] - Expected: 200
[exec] - Actual : 0
[exec]
[exec]
[exec] ..............
BUILD FAILED
/usr/local/src/apache-log4cxx/build.xml:1030: exec returned: 1
-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED]
Sent: 02 November 2007 17:44
To: Log4CXX User
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.