Alessandro Baffa created LOG4J2-2287:
----------------------------------------

             Summary: LoggerContextRule doesn't work with multiple log tests
                 Key: LOG4J2-2287
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2287
             Project: Log4j 2
          Issue Type: Question
          Components: Configurators
    Affects Versions: 2.11.0
         Environment: Java 8,

Gradle 4.5, 

{{dependencies {}}
{{    compile('org.apache.logging.log4j:log4j-api:2.11.0')}}
{{    compile('org.apache.logging.log4j:log4j-core:2.11.0')}}
{{    compile('org.apache.logging.log4j:log4j-core:2.11.0:tests')}}
{{}}}
            Reporter: Alessandro Baffa


Hi,

this issue is related to the closed 
[LOG4J2-1316|https://issues.apache.org/jira/browse/LOG4J2-1316].

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, the second test fails 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?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to