SLF4J Binding for Apache Maven
Clone or download
Latest commit 1e9e0bc Feb 23, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github .github templates Feb 8, 2018
est Up to 2017, Happy New Year! Jan 5, 2017
src Up to 2017, Happy New Year! Jan 5, 2017
.0pdd.yml 0pdd config Jan 29, 2018
.gitattributes gitattributes Jun 22, 2015
.gitignore migrated Sep 4, 2013
.pdd .pdd added Dec 22, 2016
.rultor.yml updated merge/commanders list May 11, 2017
.travis.yml oraclejdk7 removed Dec 24, 2017
LICENSE.txt Up to 2017, Happy New Year! Jan 5, 2017
README.md EO badge changed Feb 23, 2018
pom.xml Up to 2017, Happy New Year! Jan 5, 2017

README.md

EO principles respected here Managed by Zerocracy DevOps By Rultor.com

Build Status PDD status Maven Central Javadoc Dependencies

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