[ 
https://issues.apache.org/jira/browse/LOG4J2-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17466979#comment-17466979
 ] 

Ralph Goers commented on LOG4J2-3304:
-------------------------------------

OK. That explains it. I configure my Spring Boot apps by adding the following 
to bootstrap.yml

 

 
{code:java}
spring:
  application:
    name: my-app
  cloud:
    config:
      uri: https://spring-configuration-server.lab.apache.org
      username: someuser
      password: somepwd

logging:
   config: 
"${spring.cloud.config.uri}/${spring.application.name}/default/master/log4j2.xml?override=${spring.cloud.config.uri}/${spring.application.name}/default/master/log4j2-${spring.application.name}-dev.xml"
   auth: 
     username: ${spring.cloud.config.username} 
     password: ${spring.cloud.config.password} {code}
So I don't configure spring boot apps using the system property. 

I will take a look at this.

 

> SpringEnvironmentHolder getEnvironment always return null
> ---------------------------------------------------------
>
>                 Key: LOG4J2-3304
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3304
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API, Spring
>    Affects Versions: 2.17.1
>            Reporter: francis
>            Priority: Major
>
> I am using SpringLookup and SpringProfileArbiter for conditional 
> configuration,  but it doesn't work. I debugged into SpringEnvironmentHolder 
> and found that the getEnvironment method always returns null. Then I found 
> the root cause is that when the factoryClassName is present and load 
> successfully, the LogManagerStatus is not set in the static block of 
> LogManager. It could be a bug, please take a look



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to