Skip to content

jcabi/jcabi-maven-slf4j

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

logo

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

mvn PDD status Maven Central Javadoc codecov

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.

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