patron icon indicating copy to clipboard operation
patron copied to clipboard

Change log level at runtime

Open cioboteacristian opened this issue 5 years ago • 3 comments

Feature request

It would be very useful to be able to change the log level at runtime. For example, we started our service with LOG_LEVEL=info. But, we've observed that we have a bug in our service, and we would like to get more data on our service by switching the LOG_LEVEL=debug for a couple of minutes and analyze the logs.

Describe the solution

A possible solution would be to have an admin endpoint /admin/log?level=TRUE. We need to investigate how to propagate this change to patron log and handle this "state"

An example of such feature is in Dropwizard, a Java REST WS: https://github.com/stuartgunter/dropwizard-logging-config/blob/master/README.md#configure-a-user-defined-log-level-for-a-single-logger, where you can change loglevel, but also log implementation on the fly.

cioboteacristian avatar Feb 12 '20 14:02 cioboteacristian

I'd like to have a look at this.

Stefos avatar May 25 '20 13:05 Stefos

Is there any update on that one? It seems like a very nice addition and we often need it.

oss92 avatar Jun 22 '21 10:06 oss92

@oss92 we had @Stefos some time ago interested in this. Maybe if this is something that you can discuss with him?

mantzas avatar Jun 22 '21 11:06 mantzas