commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [common-logging] disabling logging
Date Sun, 02 Apr 2006 01:46:05 GMT
Hi Alex,

On Sat, 2006-04-01 at 20:00 -0500, Alex wrote:
> I can't seem to get disabling logging to work.
> I made a jar file put another file '' inside of
> it. Added text
> 'org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog'
> To it. Put it the first thing in my CLASSPATH and logging still shows up...
> Any ideas?

You mean you've created a jarfile 'foo.jar' containing (and maybe some other stuff), and added
foo.jar to the classpath?

I presume you've put the file at the top
level, not nested under something like

The thing most likely to be wrong is that somehow your jar is *not* the
first thing on the classpath.

Is the code you're running a stand-alone app, a webapp, or something
else? If you're talking about a webapp, then there are of course
multiple classpaths involved. Generally, environments like Tomcat ignore
any CLASSPATH environment variable and set their own for example.

If you can add something like this to your code it would help debugging
this issue:
  Enumeration e = Thread.currentThread.getContextClassLoader().
  while (e.hasMoreElements()) {
That will show where the file really occurs on the classpath.

Which version of commons-logging are you using?



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

View raw message