commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [CLI] new design possibly?
Date Fri, 07 Feb 2003 21:39:51 GMT

On Fri, 7 Feb 2003, Nicola Ken Barozzi wrote:

> Henri Yandell wrote, On 07/02/2003 17.32:
> >
> > I don't see how this can work without ensuring that another package,
> > commons-stub is in the classpath. I know I'm definitely not going to copy
> > and paste pieces of code from library to library to handle looking for
> > commons-logging.
> package org.apache.myproject;
> public class Logger extends SafeCommonsLogger

I don't understand. Sorry. Where is SafeCommonsLogger? In commons-stub?

> >>2) it should be possible to pass the logger to the library instead
> >>    of having it search for it via static accessors
> >
> > Explosion of API. This is unnecessary overloading. Why isn't it simply
> > handled via a factory mechanism? Akin to JNDI.
> Again... we don't want factory methods...
> I'm not saying that you have to agree with me on IOC, just acknowledge
> that it's a reasonable thing to do. Heck, just one method, is it too much?

I'm not big on the factory thing, just an idea etc as I'm doing a lot of
JNDI at the moment.

The problem for me is that your solution is one method in every single
library. That seems to send off alarm bells in my head.

Until I see your solution [is it somewhere?] I'm probably not
understanding it.

> >>This means that if I want to log, I have to add an environmental
> >>variable for every library I want to log, and put commons logging in the
> >>classpath, or set the logger on each package I want to log.
> >>
> >>What do you think? What of the above seems unreasonable to you?
> >
> > All of the above :) Plus adding an envrionment variable per library is a
> > poor management technique. I want to store them all in a file, not as a
> > host of -D arguments or even in code.
> Ok, the problem arises when a user has multiple of these files in the
> classpath. I've seen it happen more than once.

Agreed. I have this problem with constantly when a jar
I've deployed is hiding its own little file.

> Poor management technique? I'm just talking about utility libraries.
> As a user, do I ever have to manage logging, or even remotely have to
> deal with it?

The example Java user for me is my company's Java Admin. So yes, he does a
fair bit of work on managing the logging :)

> I want to get XJar and use it. No logging, I'm not a developer. This is
> the use-case. Any other possible solution?

Unsure if I really understand the issue here. Are you against CLI having
any dependency? If I add a feature which makes it dependent on
Commons-Lang tomorrow, is this going to upset people?

When I grab XJar, I grab the dependencies [there ought to be an installer
that does it for me though].

I'm happy to agree that commons-logging should be quiet by default and not
print anything out unless there is some kind of configuration way
[ or whatever] to turn it on.

I'm nothing to do with commons-logging btw, am a user/potential-user like


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

View raw message