logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (LOG4J2-696) RegexFilter does not match multiline log messages
Date Mon, 04 Apr 2016 14:34:25 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ralph Goers reopened LOG4J2-696:
--------------------------------

It doesn’t look like the RegexFilter is ever used in any test configurations.  From the
factory method I would have expected to see a PatternFlagsPlugin to convert a container element
into a String. Without a plugin I’m not sure how this will work.

> RegexFilter does not match multiline log messages
> -------------------------------------------------
>
>                 Key: LOG4J2-696
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-696
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Filters
>    Affects Versions: 2.0-rc2
>            Reporter: phil wray
>         Attachments: RegexFilterTest.java
>
>
> RegexFilter is constructed with a pattern, but pattern does not support multiline matches,
so impossible for the filter to ever match a multiline msg.
> Should maybe provide a multline="x attribute whichi should default to true and result
in the patter being compiled as such:
> Pattern pattern = Pattern.compile(".*line.*", Pattern.DOTALL);
> See attached UnitTest illustrating failure



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message