Skip to content

super132/jcabi-maven-slf4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Made By Teamed.io DevOps By Rultor.com

Build Status Maven Central

More details are here: slf4j.jcabi.com

Maven Log to SLF4J binding is implemented with StaticLoggerBinder singleton. This is how you use it in your Maven plugin:

import com.jcabi.log.Logger;
import org.apache.maven.plugin.AbstractMojo;
import org.slf4j.impl.StaticLoggerBinder;
public class MyMojo extends AbstractMojo {
  @Override
  public void execute() {
    StaticLoggerBinder.getSingleton().setMavenLog(this.getLog());
    // ... later ...
    Logger.info(this, "hello, world!");
    // and you can still use the usual logging mechanism
    this.getLog().info("hello again");
  }
}

The Logger.info() call will go to Maven Log through SLF4J.

Questions?

If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.

How to contribute?

Fork the repository, make changes, submit a pull request. We promise to review your changes same day and apply to the master branch, if they look correct.

Please run Maven build before submitting a pull request:

$ mvn clean install -Pqulice

About

SLF4J Binding for Apache Maven

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%