Agreed. How I see it working is:

 commons-logging-log4j.jar:
    LogFactory tweaked to delegate to LogFactoryLog4j
    LogFactoryLog4j - concrete subclass log LogFactory
    Log -- standard Log interface
    Log4JLogger -- implementation of Log interface for log4j

 commons-logging-jul.jar:
    LogFactory tweaked to delegate to LogFactoryJUL
    LogFactoryJUL - concrete subclass log LogFactory
    Log -- standard Log interface
    JULLogger -- implementation of Log interface for java.util.logging

 commons-logging-dynamic.jar:
    LogFactory tweaked to delegate to LogFactoryDynamic
    LogFactoryDynamic : essentially the existing LogFactoryImpl
    LogFactoryLog4j
    Log4JLogger
    LogFactoryJUL
    JULLogger
    ......

Standalone applications, applets, embedded systems would use a
lib-specific jar eg commons-logging-log4j.jar. No irrelevant TCCL stuff,
no dynamic discovery stuff, only one logging adapter.

And commons-logging-api.jar with the facade I assume

I had made the assumption that JCL would be
supporting java versions earlier than 1.4. I guess I should check, but I
would think that the consensus is that we can't assume 1.4+ for JCL2.x

*shrug* for simple things like this there are always backports ;-)

There are a few ideas in j.u.l that we could think about borrowing.
Maybe we could provide "entering" and "exiting" logging calls, which map
to DEBUG level on libs that don't have equivalents?

What we ended up doing lately to distinguish between logging
and tracing. Logging describes describes the logical flow and
is no longer used to spit out variables ...and then we used
AOP to generate the tracing to see what's going on only when
we really need it.

But let me get back on this when we rolled out that aproach ;)

Maybe
fine/finer/finest could be added which map to DEBUG? Personally I've not
seen any great demand for this functionality on the JCL user or dev
lists but if anyone does want these.....

Some of the i18n ideas also need consideration.

Like that?

  debug("my i18n text in {}", new Object[]{language});

I don't see many options for i18n except having

  debug( final String pMessage, final Object pValue);
debug( final String pMessage, final Object pValue1, final Object pValue2);
  ...

in an interface which is really ugly. Pragmatic - but ugly ;)

cheers
--
Torsten

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to