Noel J. Bergman wrote:
I have a library using slf4j for logging and I want to use it inside my
Avalon based application (Apache James).

We should use java.util.logging, which is also what tomcat switched to
using.  JULI should be entirely sufficient for our needs, and is the
standard API.

        --- Noel

Tomcat is moving to java.util.logging because JCL has big classloader issues.

Does JUL give us the possibility to log things to the current component logger (where for Logger I mean an Avalon Logger or a custom JamesLogger injected via setLogger or in the constructor of the component).

About jSPF I'm currenlty:

+1 to remove LOG4J (I always rejected direct Log4j dependency, but it was the easies path at that time, and I'm all for agility)

And here my alternatives:

+0.5 to switch to SLF4J

+0.8 to create a simple Logger interface+service under JSPF and have it specifiable in the constructor (like we already do for the DNS implementation). In this scenario the default implementation could be JUL and we could add easily an implementation over Avalon Loggers to have a good integration with the SPFHandler.

If you don't have static code imo the injected Logger service is the best solution: its bigger limitation is that it does not provide a solution for static things.

Even the other frameworks have big problem with logging inside static methods and classloading issues, that in the end are solved mainly looking up for a new logger at each method call or passing the logger to the method. The last solution would be applicable to Injected Loggers also, the first not.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to