You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "snicoll (via GitHub)" <gi...@apache.org> on 2026/07/28 05:01:00 UTC

[I] Consider making plugin builds less chatty [logging-log4j2]

snicoll opened a new issue, #4225:
URL: https://github.com/apache/logging-log4j2/issues/4225

   Our build has custom plugins and this is the output we have on a regular Gradle build:
   
   ```
   Note: GraalVmProcessor: writing GraalVM metadata for 12 Java classes to `META-INF/native-image/log4j-generated/org.springframework.boot/spring-boot-log4j/reflect-config.json`.
   Note: PluginProcessor: writing plugin descriptor for 13 Log4j Plugins to `META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat`.
   ```
   
   One thing that always tricks me is that I often forgets it is about log4j, especially reading "Note: GraalVmProcessor: writing GraalVM metadata for 12 Java classes". 
   
   Can you please consider this to be less chatty? Do we really need that log by default? If we really do, can't we do something to make it a bit more obvious that it is log4j doing something during the build? Thank you 


-- 
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: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "ramanathan1504 (via GitHub)" <gi...@apache.org>.
ramanathan1504 closed issue #4225: Consider making plugin builds less chatty
URL: https://github.com/apache/logging-log4j2/issues/4225


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "ramanathan1504 (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on issue #4225:
URL: https://github.com/apache/logging-log4j2/issues/4225#issuecomment-5722529795

   Changing the default so that these are suppressed by default would make me happy. Right now, it's a problem to rely on the `-A` options, since builds will fail if it's set and not used... which can easily happen in a multi-module project where compiler config is set at the base, and only one of the modules needs the log4j processor, while the other doesn't and doesn't use the option.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #4225:
URL: https://github.com/apache/logging-log4j2/issues/4225#issuecomment-5436647247

   It seems fine by me. Currently, the only side-effect of not providing GAV coordinates to the processor is a folder name that depends on its content.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on issue #4225:
URL: https://github.com/apache/logging-log4j2/issues/4225#issuecomment-5436593916

   #4228 has fixed `log4j.plugin.processor.minAllowedMessageKind` for `GraalVmProcessor`. Yet @snicoll's complaint, which is pretty much echoed in #4231, is not addressed.
   
   @ppkarwasz, I suggest increasing the `log4j.plugin.processor.minAllowedMessageKind` default from `NOTE` to `ERROR`. Do you agree?


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider making plugin builds less chatty [logging-log4j2]

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy closed issue #4225: Consider making plugin builds less chatty
URL: https://github.com/apache/logging-log4j2/issues/4225


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org