on 4/3/02 10:46 AM, "Geir Magnusson Jr." <[EMAIL PROTECTED]> wrote:
> Right - and with what I am thinking about, be defensive. Don't just use
> 'logger' - wrap it with a check.
>
> Or have an internal log method that does that....
So, for every class, I now also need to copy/paste in some log method?
<sarcastic>
Now that is smart OO engineering.
</sarcastic>
>>
>> I really don't understand why that is better than the Pull model which would
>> be more like this:
>>
>> class MyComponent
>> implements Component, LogEnabled
>> {
>> private static Logger logger = Log.getLogger();
>>
>> myMethod()
>> {
>> logger.info("Hello World!");
>> }
>> }
>>
>> Seems so much cleaner of a design to me and it is impossible to get an NPE.
>
> Except that forces there to be something called Log in the classpath. In
> the case where you are using the component/tool in an environment where that
> doesn't exist, you'll get a different exception, out of your control...
Isn't the point of the Commons project to come up with a set of re-usable
components? Isn't the point of the Commons-Logging project to come up with a
small .jar file that you can just drop into your classpath and use with
whatever logging system you want?
Seems that we are trying to avoid the point of why we write software for
Jakarta.
:-)
-jon
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>