arturictus / sidekiq_alive

Liveness probe for Sidekiq in Kubernetes deployments
MIT License
194 stars 57 forks source link

Disable access logs #16

Closed dvdliao closed 4 years ago

dvdliao commented 5 years ago

It is pretty noisy to see

[2019-04-24 18:42:07] INFO  WEBrick 1.4.2
[2019-04-24 18:42:07] INFO  ruby 2.5.1 (2018-03-29) [x86_64-linux]
== Sinatra (v1.4.8) has taken the stage on 7433 for staging with backup from WEBrick
[2019-04-24 18:42:07] INFO  WEBrick::HTTPServer#start: pid=1 port=7433
10.183.2.1 - - [24/Apr/2019:18:43:12 UTC] "GET / HTTP/1.1" 200 6
- -> /
10.183.2.1 - - [24/Apr/2019:18:43:14 UTC] "GET / HTTP/1.1" 200 6
- -> /
10.183.2.1 - - [24/Apr/2019:18:43:22 UTC] "GET / HTTP/1.1" 200 6
- -> /
10.183.2.1 - - [24/Apr/2019:18:43:24 UTC] "GET / HTTP/1.1" 200 6
- -> /
10.183.2.1 - - [24/Apr/2019:18:43:32 UTC] "GET / HTTP/1.1" 200 6
- -> /

every time the health check probe comes, is there a way to disable the sinatra access logs (without forking this repo)?

arturictus commented 5 years ago

doing a pull request?

robgero commented 4 years ago

@dvdliao In case you're still having this issue, I solved it by adding an initializer to my rails project and configuring the gem to use puma.

# rails_project/config/initializers/sidekiq_alive.rb
SidekiqAlive.setup do |config|
  config.server = 'puma'
end

Using puma results in no access logs being sent to STDOUT