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

LoggerContextRule doesn't work with multiple log tests

    XMLWordPrintableJSON

Details

    • Question
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.11.0
    • None
    • Configurators
    • None

    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

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

            Dates

              Created:
              Updated: