treyfarmigoni commented on code in PR #4063:
URL: https://github.com/apache/logging-log4j2/pull/4063#discussion_r2941620493


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java:
##########
@@ -78,15 +96,58 @@ public class PluginProcessor extends AbstractProcessor {
 
     private final List<Element> processedElements = new ArrayList<>();
     private final PluginCache pluginCache = new PluginCache();
+    private Diagnostic.Kind minAllowedMessageKind = Diagnostic.Kind.NOTE;
+
+    @Override
+    public void init(final ProcessingEnvironment processingEnv) {
+        super.init(processingEnv);
+        final String kindValue = 
processingEnv.getOptions().get(MIN_ALLOWED_MESSAGE_KIND_OPTION);
+        if (kindValue != null) {
+            try {
+                minAllowedMessageKind = 
Diagnostic.Kind.valueOf(kindValue.toUpperCase(Locale.ROOT));
+            } catch (final IllegalArgumentException e) {
+                processingEnv
+                        .getMessager()
+                        .printMessage(
+                                Diagnostic.Kind.WARNING,
+                                String.format(
+                                        "%s: unrecognized value `%s` for 
option `%s`, using default `%s`. Valid values: %s",
+                                        PluginProcessor.class.getSimpleName(),

Review Comment:
   Agree. Modified to getName. 



-- 
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]

Reply via email to