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

LoggerContextRule doesn't work with multiple log tests

    XMLWordPrintableJSON

    Details

    • Type: Question
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.11.0
    • Fix Version/s: None
    • Component/s: Configurators
    • Labels:
      None
    • Environment:

      Description

      Hi,

      this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I let the maintainer decide.

      I am still facing the same issue with LoggerContextRule when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, all the following tests fail with the the error

      ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml

      Is it still related to the same problem in the closed issue?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alebaffa Alessandro Baffa
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: