Managing logging.level using ConfigServer

家住魔仙堡 提交于 2019-12-04 06:24:01

问题


Spring Boot application using 1.1.9.RELEASE

Trying to setup logging in the simplest case

logging:
  level:
    org.springframework.web: DEBUG

Scenario 1: adding above lines to application.yml in /resources - WORKS

Scenario 2: when adding these lines to github repo used by config server however application does not seems to use it. Just to make sure calling /env endpoint produces the following output

configService:https://github.com/myrepo/config/file:/mypath/transportation.yml:   {
      logging.level.org.springframework.integration: "DEBUG",
      logging.level.org.springframework.web: "TRACE",
      logging.level.org.springframework.ws: "TRACE",
      ...
} 

So Environment seems to load correctly. Also if I add logging.level lines into bootstrap.yml it works until new environment loaded from the config server (I can see DEBUG level output)

Am I missing something or there is some sort of limitation regarding logging levels and configserver?


回答1:


Works for me. Did you remember to refresh the application (e.g. POST to /refresh) to propagate the change?



来源:https://stackoverflow.com/questions/28198647/managing-logging-level-using-configserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!