logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vyom Jain <vyom0...@gmail.com>
Subject Example RegexFilter using Pattern support added in LOG4J2-696
Date Mon, 04 Apr 2016 12:23:36 GMT
Hello Everyone!

Has anyone tried the feature implemented in LOG4J2-696
<https://issues.apache.org/jira/browse/LOG4J2-696> and would be interested
in sharing an example configuration which worked?

I've tried
<RegexFilter regex=".*test.*" onMatch="ACCEPT" onMismatch="DENY"
PatternFlags="DOTALL"/>

which gives an error ERROR RegexFilter contains an invalid element or
attribute "PatternFlags" during JVM startup.

Following doesn't work either -
<RegexFilter regex=".*test.*" onMatch="ACCEPT" onMismatch="DENY">
<PatternFlags><DOTALL/></PatternFlags>
</RegexFilter>

Also this information could be added in
http://logging.apache.org/log4j/2.x/manual/filters.html#RegexFilter.

--
Vyom

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message