Tuesday, 23 November 2010

Use SL4J To Isolate Code From Customers And Test Frameworks

If you're writing libraries that other people will use and you use logging, then you may have a problem.

There are so many logging frameworks out there, you're bound to have customers who use different logging libraries.

I use SL4J to solve this issue. It is the 'Simple Logging Facade For Java' and has a plugin jar for each target logging environment. This allows your library to play nicely with the logging system in the target environment without you knowing what it is.

No comments:

Post a Comment