On Sat, 2007-03-17 at 16:23 +0100, Torsten Curdt wrote:
On 17.03.2007, at 15:20, Oleg Kalnichevski wrote:
Folks,
Please correct me if I am wrong, but the auto-discovery mechanism in
Commons Logging is believed to be the only major gripe about JCL.
What happened to the idea of releasing a version of JCL that
retains the
full API compatibility with JCL 1.0.x and 1.1.x but with the
auto-discovery mechanism removed / disabled per default?
Good question I also really liked that idea. But I guess someone just
have to do it.
...but you don't have to wait for that - write your own LogFactory
implementation.
At least that's what we did.
To disable auto-discovery, just use an environment variable to specify
which system you want, eg
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
This is described in the user guide:
http://jakarta.apache.org/commons/logging/guide.html
However writing your own LogFactory is also a reasonable solution; it's
only a handful of methods, all with trivial implementations.
What was being considered for JCL was distributing one JCL version for
each supported logging lib, in a way similar to SLF4J. However that
requires a fair amount of work and it doesn't appear that anyone is
particularly interested in tackling this.
Or you could use SLF4J which (I believe) does provide
one-jar-per-supported-lib and provides commons-logging compatibility.
Possibly it would be a good idea to provide a simple
JCL-to-java.util.logging mapping, as most apps should probably be using
java.util.logging now.
Regards,
Simon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]