ramanathan1504 commented on issue #4225: URL: https://github.com/apache/logging-log4j2/issues/4225#issuecomment-5101197201
@snicoll, Thanks for raising this issue. You are completely right—the build logs are too chatty and the `GraalVmProcessor` message lacks `[Log4j]` branding, making its origin ambiguous. ### Current Workaround As documented in our [Plugin Documentation](https://logging.apache.org/log4j/2.x/manual/plugins.html#plugin-registry), Log4j provides an option to suppress processor notes by raising the minimum allowed log level to `WARNING`: **For Gradle (`build.gradle`):** ```groovy compileJava { options.compilerArgs << '-Alog4j.plugin.processor.minAllowedMessageKind=WARNING' } ``` **For Maven (`pom.xml`):** ```xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <compilerArgs> <arg>-Alog4j.plugin.processor.minAllowedMessageKind=WARNING</arg> </compilerArgs> </configuration> </plugin> ``` --- ### Known Gap & Upcoming Fix While investigating this, we identified two gaps: 1. **`GraalVmProcessor` ignores this option:** While `PluginProcessor` goes silent with the option above, `GraalVmProcessor` currently lacks this check and still prints its note. 2. **Missing `[Log4j]` Prefix:** The log messages do not explicitly mention `Log4j`. **Fix Plan:** * Update `GraalVmProcessor` to respect `log4j.plugin.processor.minAllowedMessageKind`. * Prefix all processor log messages with `[Log4j]` (e.g., `[Log4j] GraalVmProcessor: ...`). --- If you are interested in contributing, we would love a Pull Request for this! The PR should include: - The fix in `GraalVmProcessor` and updated message prefixes in both processors. - A unit/integration test verifying the behavior. - A changelog entry under `src/changelog/`. Thanks -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
