vy commented on code in PR #4228: URL: https://github.com/apache/logging-log4j2/pull/4228#discussion_r3782146399
########## src/site/antora/modules/ROOT/pages/manual/plugins.adoc: ########## @@ -215,13 +215,13 @@ The `GraalVmProcessor` requires your project's `groupId` and `artifactId` to cor Provide these values to the processor using the `log4j.graalvm.groupId` and `log4j.graalvm.artifactId` annotation processor options. ==== -.Suppressing notes from `PluginProcessor` in strict build environments +.Suppressing annotation processor notes in strict build environments [%collapsible] ==== Some build environments treat all compiler notes or warnings as errors (e.g., Maven with `-Werror` or Gradle with `options.compilerArgs << '-Werror'`). -By default, `PluginProcessor` emits a `NOTE`-level diagnostic when it writes the plugin descriptor, which can cause the build to fail in those environments. +By default, `PluginProcessor` and `GraalVmProcessor` emit `NOTE`-level diagnostics when they write their descriptors, which can cause the build to fail in those environments. To suppress these informational notes, pass the `log4j.plugin.processor.minAllowedMessageKind` annotation processor option with a value of `WARNING` or `ERROR`. -This instructs the processor to only emit diagnostics at or above the specified severity, silencing routine notes while preserving genuine warnings and errors. +This instructs both processors to only emit diagnostics at or above the specified severity, silencing routine notes while preserving genuine warnings and errors. Review Comment: ```suggestion This instructs aforementioned processors to only emit diagnostics at or above the specified severity, silencing routine notes while preserving genuine warnings and errors. ``` ########## src/changelog/.2.x.x/4225_plugin_processor_messages.xml: ########## @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<entry xmlns="https://logging.apache.org/xml/ns" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + https://logging.apache.org/xml/ns + https://logging.apache.org/xml/ns/log4j-changelog-0.xsd" + type="changed"> + <issue id="4225" link="https://github.com/apache/logging-log4j2/issues/4225"/> Review Comment: ```suggestion <issue id="4225" link="https://github.com/apache/logging-log4j2/issues/4225"/> <issue id="4228" link="https://github.com/apache/logging-log4j2/pull/4228"/> ``` ########## log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java: ########## @@ -68,6 +68,7 @@ public class PluginProcessor extends AbstractProcessor { // TODO: this could be made more abstract to allow for compile-time and run-time plugin processing private static final Element[] EMPTY_ELEMENT_ARRAY = {}; + private static final String MESSAGE_PREFIX = "[Log4j] "; Review Comment: ```suggestion private static final String MESSAGE_PREFIX = "[Log4j] "; ``` -- 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]
