vy commented on code in PR #4119:
URL: https://github.com/apache/logging-log4j2/pull/4119#discussion_r3316190526


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/filter/RegexFilter.java:
##########
@@ -130,48 +135,100 @@ public String toString() {
      * @param mismatch
      *        The action to perform when a mismatch occurs.
      * @return The RegexFilter.
-     * @throws IllegalAccessException  When there is no access to the 
definition of the specified member.
-     * @throws IllegalArgumentException When passed an illegal or 
inappropriate argument.
      */
-    // TODO Consider refactoring to use AbstractFilter.AbstractFilterBuilder
-    @PluginFactory
     public static RegexFilter createFilter(
             // @formatter:off
             @PluginAttribute("regex") final String regex,
-            @PluginElement("PatternFlags") final String[] patternFlags,
+            @PluginAttribute("patternFlags") final String[] patternFlags,

Review Comment:
   This sounds like a breaking API change to me. That is, I guess the following 
was working, and is broken with this change:
   
   ```
   <RegexFilter regex="error" onMatch="ACCEPT" onMismatch="DENY">
     <PatternFlags>
       <tag-name-here-does-not-matter>UNIX_LINES</tag-name-here-does-not-matter>
       <tag-name-here-does-not-matter>DOTALL</tag-name-here-does-not-matter>
     </PatternFlags>
   </RegexFilter>
   ```
   
   @ramanathan1504, would you mind verifying this, please?



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