-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix RegexFilter pattern flags #3086
Copy link
Copy link
Labels
bugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codeconfigurationAffects the configuration system in a general wayAffects the configuration system in a general wayjavaPull requests that update Java codePull requests that update Java code
Milestone
Metadata
Metadata
Assignees
Labels
bugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codeconfigurationAffects the configuration system in a general wayAffects the configuration system in a general wayjavaPull requests that update Java codePull requests that update Java code
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
To triage
In the Log4j 2.x documentation for the RegexFilter:
https://logging.apache.org/log4j/2.x/manual/filters.html#RegexFilter
The only two configuration attributes are "regex" and "useRawMsg" (and the common filter attributes onMatch/onMismatch).
In the RegExFilter @pluginfactory there is a nested element for a set of Strings which is not mentioned in the documentation:
If I understand correctly one can provide field names from the Pattern class here: (CASE_INSENSITIVE, COMMENTS, etc.).
The example in the Plugin Reference for the RegexFilter shows an example of nested strings but is not very clear with "a-String-implementation":
Is it?:
A usage example would be helpful.
Maybe this API is not really "public"? In the log4j-core-test RegexFilter test it seems the RegexFilter is never tested with anything but a null value for the patternFlags.