Martin Ritchie wrote:
2009/9/22 Rajith Attapattu <[email protected]>:
Martin/Marnie,

As I mentioned in one of my previous emails, I recognized the issue
with having a log4j.xml in the classpath.
Therefore I proposed to convert the log4j.xml to a log4j.properties.
The current behaviour is totally unacceptable and believe me there is
a fair number of folks who have complained about this as well.

So I guess using a log4j.properties file in the client module is a
reasonable compromise as

a) It avoids the issue of conflicting log4j.xml and avoids the
horrible classpath ordering issues (note the classpath issue is still
going to be there if users are still using the old log4j.properties
format instead of the new log4j.xml).

log4j.properties is still searched for by log4j if it cannot find a
log4j.xml so I don't see how renaming it fixes the issue, it just
requires users to call their configuration log4j.xml rather than
log4j.properties. What if they want log4j.properties.

b) It fixes the default logging from debug to warn.

Writing tests that are representative need to have representative
logging. When it comes to writing performance tests the test writer
really needs to know what they are doing and if they don't know what
their logging is, and by not configuring it they demonstrate that they
don't, then they are going to be having some real difficulties.

I find it so hard to believe that users of org.apache.* libraries have
never had to set up their logging. We use commons in the java broker
and when we upgraded to 1.6 the logging went from zero to a good 400%
increase on the normal broker startup.

Perhaps we could do something fancy with a static logging
initialisation class. That sets org.apache.qpid to WARN if there is no
logger defined for it. I'm not sure that slf4j will let us know that
logging has been configured.

What does ActiveMQ do? As another Apache's JMS provider I would expect
to behave at least as well as they do.


My 2 cents is that I don't think we should be setting debug logging out of the box. How to achieve
that in the Java client, I'm not the right one to comment.

Carl.

Reply via email to