Spring Boot: LoggingApplicationListener interfering with Application Server logging

前端 未结 2 769
北海茫月
北海茫月 2021-01-04 08:52

Spring Boot automatically initializes the underlying logging system using the LoggingApplicationListener. This is a nice thing if the application I\'m developin

2条回答
  •  伪装坚强ぢ
    2021-01-04 09:35

    Since Spring Boot 1.4 the LoggingSystem autoconfiguration can be disabled.

    Take a look at the Custom Log Configuration section of the Spring documentation:

    You can force Spring Boot to use a particular logging system by using the org.springframework.boot.logging.LoggingSystem system property. The value should be the fully qualified class name of a LoggingSystem implementation. You can also disable Spring Boot’s logging configuration entirely by using a value of none.

    For Tomcat, for example, set the environment variable JAVA_OPTS:

    JAVA_OPTS="-Dorg.springframework.boot.logging.LoggingSystem=none"
    

提交回复
热议问题