the situation is that my project configuration file application.yml has log configuration, eg logging: level: org.springframework: error but my logback.spring is set as logger name="org.springframework" level=“trace” thus when packaging project jar file,and run with java -jar --logging.config=logback-spring.xml,logging file can't print spring 'trace' level log. so I want to know when configuration file and logback-spring.xml file both has log configuration, who take effect?

Thank you for clearing me up!!

Comment From: wilkinsona

The log levels configured in the environment (via application.properties, application.yaml, system properties, etc) are applied after the configuration has been loaded. As you have already seen, this means that any default levels specified in your Logback XML will be overwritten by levels configured in the environment.

If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.