imaginary icon indicating copy to clipboard operation
imaginary copied to clipboard

Disable logging on health check enpoint

Open mcasimir opened this issue 7 years ago • 4 comments

Imaginary is dumping a bloat of logs on Kubernetes reporting successful calls on /health.

Can we disable it?

Shouldn't it be disabled by default?

mcasimir avatar Feb 05 '18 16:02 mcasimir

Personally I like seeing that health checks actually happen and work as intended. If you want to filter them out you can use the common practices of grep and/or apply filters in your Kibana or Stackdriver, etc. interfaces.

Dynom avatar Feb 06 '18 09:02 Dynom

Well, definitely It's not such a massive amount of logs. Probably just a nice to have.

My usual approach is to set the level for /health logs to debug or trace and mute them in production, in the end, the same info will be available in the service that calls the health check.

I would still keep the log though, it would just be better to have a way to control that.

Thanks!

mcasimir avatar Feb 06 '18 14:02 mcasimir

I know this is an old issue, but please reconsider. I don't understand the decision to not make the log level configurable somehow. Of course, it's not a major issue, but it is pretty annoying TBH.

It would be very nice to be able to set a log level in a environment variable or something similar, Sure, I can filter it out somewhere along the logging pipeline, but it is a good practice to keep service specific configuration as close to the service as possible. This decision is forcing us to make special arrangements for imaginary in various places in our infrastructure.

Finally I will also say that I love imaginary, and send my thanks for the time you spent putting it together.

JohannesEH avatar Nov 27 '19 13:11 JohannesEH

@JohannesEH and @mcasimir I also think that it is important can to disable info logs.

This solution works for me https://github.com/h2non/imaginary/pull/301

ebar0n avatar Apr 17 '20 05:04 ebar0n