[Biojava-l] log4j

Matthew Pocock mrp@sanger.ac.uk
Wed, 12 Jul 2000 12:29:23 +0100


Hi Gerald,

Gerald Loeffler wrote:

> Hi!
>
> When outputting logging information from java classes i usually use the
> Log4J package (www.log4j.org) instead of simply writing to System.err or
> System.out.
>
> Log4J allows you to use pre-defined logging levels for you messages that
> are identical to those on UNIX-systems: debug, info, warn, error. You
> can then turn on/off all messages of a particular level at runtime.
>
> I personally would like to keep on using Log4J for BioJava classes as
> well. Do we want to introduce this dependency on an open-source,
> third-party java package? If so, then i'd add the log4j-jar to the CVS
> repository and use it from now on in BioJava classes...
>

Log4J is the sort of tool that I would hope (expect) to see used in any
aplication built upon BioJava. However, I don't think that it is apropreate
for the core code. Any exceptional circumstances (errors, warnings etc)
should realy be handled using exceptions. Any feed-back information should
be propogated with events & listeners. If we structure the code correctly,
exceptions can be caught, logged, and recovered from in a client-dependant
way.

The other use is during debugging. Here I shair some sympathy with you. But,
I think that this code could (easily?) be commented out with search&replace
before committing to a production branch.

I am willing to be swayed in log4j's favour if you can convince me that this
kind of logging functionality belongs in the core of the library.

>
>         cheers,
>         gerald
> --
>    Gerald.Loeffler@vienna.at _________________ Software Architect
>    http://www.imp.univie.ac.at ____ http://www.daemonstration.com
>    OOA&D, Java, J2EE, JSP, Servlets, JavaBeans, ODBMS, RDBMS, XML
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l

--
Joon: You're out of your tree
Sam:  It wasn't my tree
                                                 (Benny & Joon)