1

Following the guide over here: https://sap.github.io/cloud-sdk/docs/java/guides/logging-overview#logging-overview

I am trying to use CF CLI cf set-env command to change the logs levels at runtime. This commands executes successfully and the log levels are only changed when I do a cf restage srv or cf restart srv. srv is the name of my application.

Is there any alternative where I don't have to stop the cf application and still be able to change the log levels at runtime?

RahulDeep Attri
  • 398
  • 3
  • 13
  • Is there a specific reason why you would want to change log levels so frequently that a restart of the application is cumbersome? Also, which logging framework are you using? In case you [started with an SDK Archetype](https://sap.github.io/cloud-sdk/docs/java/getting-started) that would be Logback by default. – MatKuhr Jul 29 '20 at 11:50

1 Answers1

1

No, I think in order to reload the setting from environment variables a reload is required.

You could instead implement a new endpoint in your application where you set the log level programatically. But that depends on the logging framework you are using. E.g. for Logback this can be done as described here.

MatKuhr
  • 505
  • 4
  • 13