commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <>
Subject Re: Turning off commons logging
Date Tue, 03 Jun 2008 01:39:00 GMT
simon wrote:

> Again, if you could follow my suggestion and change the output pattern a
> little, that would be useful. If the problem messages do not change,
> then that proves a different config file is in use.

What I had done is to set logging to OFF  it turned of my internal 
code's logging but did not touch the commons logging..

My conclusion was that it was not seeing the config file..

I then moved a copy to the /WEB-INF/classses

I then also turn off the logging in that file.. joy.. (and the pattern is different..)

My pattern

6450 [http-8080-Processor3]( DEBUG - 
BaseServiceBean - getPath: IndexPath

the commons logging pattern

2008-06-02 17:58:20,901 DEBUG [org.apache.commons.digester.Digester.sax] 
- endElement(,,web-app)

..with the date and time..

> Hmm. Mac OSX. Maybe you should check the JVM files themselves, just
> because I've never heard of anyone having this problem before and that
> is a less-common platform. Didn't java1.5 just get released for Mac a
> few weeks ago? Are you using that brand new release?

I searched carefully the entire classpath (JBuilder has a view that 
shows you the entire classpath used on startup) and I did find A general file in the:


.. with the following settings..

# Default global logging level.
.level= INFO

# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = 

.. which does not seem to be in effect with commons because I'm seeing 
DEBUG output..

The only other "properties" files I could find in that path had no 
mention of logging in general or log4j in particular..

(I also used "SpotLight" which searched the entire hard drive and only 
found what I expected to find and where I expected to find it..)

> There is an option to force commons-logging to output some diagnostics
> which *might* be useful in your case. See the link titled
> "Troubleshooting guide" on the commons-logging website.

Thanks I will review that...

> I'm 95% sure that the issue is that you have another log4j config file
> somewhere in your classpath. And that it is NOT inside a commons
> jarfile.

I wish you where right... so far I have not been able to find such a file..

> As a last resort, you could edit that file to
> specify NoOpLog rather than Log4JLog. That should block all messages
> logged via commons-logging, although all messages logged directly to
> log4j will not be affected. That isn't the best solution of course.

That worked..  But you are right not a good solution..  Is there 
something else I could put in that file that would allow only ERROR 
messages to come through..?

Thanks for your patience and assistance..


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message