commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krupa <>
Subject RE: Support for JDK1.4 Logger in Commons Package
Date Thu, 04 Jul 2002 08:12:20 GMT
Hi Craig,
  I do accept that removing Log4J from classpath makes the JDK1.4 works. 
But then why do we need to specify which factory and log to use in ""?

What is the use of it when there is no other factory than o.a.c.l.i.Log4JFactory??
Is the "" a bug then???.

If tweaking the o.a.c.l.i.LogFactoryImpl class makes all the Loggers work, there is no need
for file.

If my application requires both the logging frameworks (Log4J and JDK1.4) in the classpath
+how I am going to do that using the current c-l without factories for those Logging frameworks???

By the way, having a separate factory helps us configuring the c-l from properties file rather
than touching the classpath. 


-----Original Message-----
From: Craig R. McClanahan []
Sent: 03 July 2002 19:07
To: Jakarta Commons Developers List
Cc: ''
Subject: Re: Support for JDK1.4 Logger in Commons Package

On Wed, 3 Jul 2002, krupa wrote:

> Date: Wed, 3 Jul 2002 11:20:40 +0100
> From: krupa <>
> Reply-To: Jakarta Commons Developers List <>
> To: "''" <>
> Cc: "''" <>
> Subject: Support for JDK1.4 Logger in Commons Package
> Hi there,
>        I have few issues when I am using Commons Logging Package...
> No Factories provided other than for Log4J:

You don't need a special factory for this -- the default factory supports
JDK 1.4 logging just fine (i.e. it creates instances of
org.apache.commons.logging.impl.Jdk14Logger).  The actual JD 1.4 logging
configuration is done in the usual way (edit "" in

Thus, when I have a statement like this in my application class:

  Log log = LogFactory.getLog("foo");

and don't set any of the configuration variables, I get a Log4J logger
named "foo" if Log4J is present in the class path, or a JDK 1.4 logger if
Log4J is not present (and I'm running on 1.4, of course).

To be honest, I have no idea why Costin implemented o.a.c.l.i.Log4jFactory
as a separate factory implementation, instead of just tweaking the default
o.a.c.l.i.LogFactoryImpl class.  But the standard factory supports JDK 1.4
just fine for me.


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

This message, together with any attachments, is
confidential and is intended only for the use of
the addressee(s) and may contain information
which is covered by legal, professional or other
privilege. If you are not the intended recipient,
please destroy this E-mail and inform us.

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

View raw message