Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-696

RegexFilter does not match multiline log messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.0-rc2
    • None
    • Filters
    • None

    Description

      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

      Attachments

        1. RegexFilterTest.java
          1 kB
          phil wray

        Activity

          People

            rgoers Ralph Goers
            phil.wray phil wray
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: