• 0.24.1

Static Wrapper of SLF4J

Logger is a convenient static wrapper of slf4j (don't forget to include one of SLF4J Bindings into the project):

import com.jcabi.log.Logger;
class Foo {
  void bar(int value) {
    Logger.debug(this, "method #bar(d) was called", value);

Read also about log decors and a convenient AOP annotation @Loggable from jcabi-aspects.

There are a few other convenient classes in this package:

  • VerboseRunnable: wrapper around java.lang.Runnable that swallows all runtime exceptions and logs them to SLF4J.
  • VerboseProcess: wrapper around java.lang.Process that monitors process executions, collects its output into a String and logs everything through SLF4J.
  • VerboseThreads: an implementation of java.util.concurrent.ThreadFactory that instantiates threads that log all runtime exceptions through SLF4J.

The only dependency you need is (you can also download jcabi-log-0.24.1.jar and add it to the classpath):


Cutting Edge Version

If you want to use current version of the product, you can do it with this configuration in your pom.xml: