Skip to content

Repository files navigation

Maven Central Latest

Annotation processor logger

A dedicated annotation processor SLF4J implementation which delegates logging to javax.annotation.processing.Messager.

Usage

  1. Add the dependency to your annotation processor project

    <dependency>
    <groupId>com.cosium.logging</groupId>
    <artifactId>annotation-processor-logger</artifactId>
    <version>${annotation-processor-logger.version}</version>
    </dependency>
  2. Make your javax.annotation.processing.Processor extend com.cosium.logging.annotation_processor.AbstractLoggingProcessor

    publicclassMyProcessorextendsAbstractLoggingProcessor {
    protectedbooleandoProcess(Set<? extendsTypeElement> annotations, RoundEnvironmentroundEnv) {
    // Make the world a better place
    }
    }
  3. Use SLF4J as usual

Enabling all logging levels

Maven

In the Maven project using your annotation processor, enable showWarnings in maven-compiler-plugin

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>

About

A dedicated annotation processor SLF4J implementation which delegates logging to javax Messager

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages