An open API service indexing awesome lists of open source software.

https://github.com/cosium/annotation-processor-logger

A dedicated annotation processor SLF4J implementation which delegates logging to javax Messager
https://github.com/cosium/annotation-processor-logger

Last synced: 9 months ago
JSON representation

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

Awesome Lists containing this project

README

          

[![Maven Central Latest](https://img.shields.io/maven-central/v/com.cosium.logging/annotation-processor-logger.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.cosium.logging%22%20AND%20a%3A%22annotation-processor-logger%22)

# 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
```xml

com.cosium.logging
annotation-processor-logger
${annotation-processor-logger.version}

```

2. Make your `javax.annotation.processing.Processor` extend `com.cosium.logging.annotation_processor.AbstractLoggingProcessor`

```java
public class MyProcessor extends AbstractLoggingProcessor {
protected boolean doProcess(Set extends TypeElement> annotations, RoundEnvironment roundEnv) {
// 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`

```xml



org.apache.maven.plugins
maven-compiler-plugin

true


```