I asked a question earlier today about log4j and was told that it is now “legacy” and that I should use slf4j and logback. So now I will use that but I don’t understand where to start? slf4j is a abstraction layer over other logging frameworks after what I read but I can’t find anything other than really basic hello world logging tutorials? How do I configure slf4j and use it?
Share
Slf4j is the API and yes logback is probably the implementation that you want.
Just use the slf4j logger classes in your code and the add logback.jar and logback.xml to your classpath.
The logback homepage contains a lot of the information you need to get started.