[ https://issues.apache.org/jira/browse/LOG4J2-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17392338#comment-17392338 ]
Carter Kozak commented on LOG4J2-3083: -------------------------------------- Regarding the {{log4j-to-slf4j}} problem, I see our configuration in pom.xml which excludes the module from everything except {{OverflowTest.java}}, however my IDE is unable to pick that up. That's a relief, I had thought our tests weren't running as expected -- this makes things much easier. I can likely get sufficient coverage of the java9 code by porting it to the master branch where we no longer need multirelease jars. It will be unfortunate that tests don't run directly against the release-2.x code, but the coverage should give us some degree of confidence. > Why the logger get by Slf4j LoggerFactory.getILoggerFactory() can only use > current LoggerContext > ------------------------------------------------------------------------------------------------ > > Key: LOG4J2-3083 > URL: https://issues.apache.org/jira/browse/LOG4J2-3083 > Project: Log4j 2 > Issue Type: Question > Affects Versions: 2.13.3 > Environment: Spring Boot 2.4.5 > Slf4j > Reporter: wanghao > Assignee: Ralph Goers > Priority: Major > Labels: newbie > > In SpringBoot project with +test+ profile, > org.slf4j.LoggerFactory.getLogger("xxx") can get test profile LoggerContext > and read configuration from log4j2-test.xml. > But > org.slf4j.LoggerFactory.getILoggerFactory().getLogger("xxx") can only get > current LoggerContext and read configuration from log4j2.xml. > > Is it designed like this? Why? -- This message was sent by Atlassian Jira (v8.3.4#803005)