0

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?

vladsfl
  • 617
  • 8
  • 18
  • This line looks strange to me: `configService:https://github.com/myrepo/config/file:/mypath/transportation.yml`. Why does it have `file:` in the middle of it? – spencergibb Jan 28 '15 at 19:14
  • Thats how it displays it on Windows ... I confirmed that config server settings take effect from the same transportation.yml - for example same section contains - server.port and that takes effect so I everything seems to be properly read into the environment. – vladsfl Jan 28 '15 at 20:22
  • @spencergibb - Spring Cloud is awesome we are using full stack here - thus many questions and little issues - http://stackoverflow.com/questions/28201779/hystrix-stream-and-management-context – vladsfl Jan 28 '15 at 20:29
  • Cool, we appreciate the feedback. I'll look at the logging, I'm certain it has worked before. It's one of our cool demos to change the log levels dynamically. – spencergibb Jan 28 '15 at 20:54
  • Added issue https://github.com/spring-cloud/spring-cloud-config/issues/74 – spencergibb Jan 28 '15 at 22:48
  • Did you try a snapshot? There were some issues with log configuration on the server (don't remember it affecting the client though). – Dave Syer Jan 29 '15 at 07:22

1 Answers1

0

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

Dave Syer
  • 56,583
  • 10
  • 155
  • 143
  • POST to /refresh worked and logging level was changed. I think it would be nice however not to have to do that right after application starts since it first time it loads environment from the config server and all other settings seems to take effect as they suppose to. I understand that logging system is already initialized by then and that's what the issue is. – vladsfl Jan 29 '15 at 13:53
  • Sorry I must be have missed something. You shouldn't need to refresh if the config server has the log levels when you start the app. Spencer has a candidate fix for that issue if it is indeed an issue. – Dave Syer Jan 29 '15 at 17:48