[ 
https://issues.apache.org/jira/browse/LOG4J2-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alessandro Baffa updated LOG4J2-2287:
-------------------------------------
    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?

  was:
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, 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?


> 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
>            Priority: Major
>
> 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?



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

Reply via email to