Log4j 2
  1. Log4j 2
  2. LOG4J2-696

RegexFilter does not match multiline log messages

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc2
    • Fix Version/s: None
    • Component/s: Filters
    • Labels:
      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

        Activity

        phil wray created issue -
        phil wray made changes -
        Field Original Value New Value
        Attachment RegexFilterTest.java [ 12653372 ]
        Gary Gregory made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            phil wray
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development