Set Logging Level in Spring Boot via Environment Variable

后端 未结 10 1073
刺人心
刺人心 2020-12-23 08:57

Should it be possible to set logging levels through environment variables alone in a Spring Boot application?

I don\'t want to use application.properties

10条回答
  •  天命终不由人
    2020-12-23 09:53

    This is just an idea, but did you try setting

    _JAVA_OPTIONS=-Dlogging.level.org.springframework=TRACE?

    Theoretically, this way -Dlogging.level.org.springframework=TRACE will be passed as default JVM argument and should affect every JVM instance in your environment.

提交回复
热议问题