imaginary
                                
                                 imaginary copied to clipboard
                                
                                    imaginary copied to clipboard
                            
                            
                            
                        Disable logging on health check enpoint
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?
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.
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!
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 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