I have a microservice developed using Spring Boot. The application is deployed in pivotal cloud foundry. I have set the logs levels in logback.xml which is part of the application. In order to change the log level , I have to update the logback.xml and rebuild / redeploy the app. Is there a better way to do this without having to redeploy the app? Is there a way to set log level as env variable in PCF?
3 Answers
I have not used logback so don't know much on it. But may be this thread can help - Set Logging Level in Spring Boot via Environment Variable

- 1,292
- 11
- 17
If you are using Spring Boot 1.5 or higher, and PCF 1.9 or higher you can change log levels from the Apps Manager without having to redeploy:
http://docs.pivotal.io/pivotalcf/1-9/console/using-actuators.html#manage-log-levels

- 1,385
- 10
- 17
-
Thanks a lot , Corby. – Punter Vicky Feb 16 '17 at 03:38
Have you ever thought of externalizing your application configuration.... Pcf provides a service called config-server, which uses a git repo for maintaining your application configuration.... Using spring boot actuator, you can actually reload the updated configuration without actually doing redeploy/rebuild of your app. This links should help you: https://docs.pivotal.io/spring-cloud-services/1-5/common/config-server/index.html

- 1
- 1
- 2