Logback has a feature to scan changes in logback.xml (per this) - this is a great feature which allows long running applications to be shipped with INFO as default level to be changed to DEBUG when something has to be briefly investigated.
But in my recent app (hosted on my company's K8s cluster as a Docker container), am unable to use the above feature because:
Given this, is there a way I can build a provision for developers to change the logging level of my application at runtime without an app/container restart?
I have a similar problem: I need to change the application log level at runtime without restart the spring boot application. In my situation, I'm not working in a docker context, but I think the solution to our problem is the same.
After research I found 3 possible solutions:
The 3 solution is the best, if your app is a Spring Boot app. You can read the following tutorial Changing the logging level at runtime.
You can found an example how to enable the Admin interface on Github.