Skip to content

Instantly share code, notes, and snippets.

@yalab
Last active February 7, 2016 08:28
Show Gist options
  • Save yalab/d607368eabd8f726558e to your computer and use it in GitHub Desktop.
Save yalab/d607368eabd8f726558e to your computer and use it in GitHub Desktop.
# config/initializers/puma_worker_killer.rb
module QuietPumaWorkerKillerLog
def log(str)
if !ENV["ENABLE_PUMA_WORKER_KILLER_LOG"] && str.split(/\s/)[0] == "PumaWorkerKiller:"
# Nothing to do
else
super
end
end
end
Puma::Runner.send(:prepend, QuietPumaWorkerKillerLog) if defined?(Puma::Runner)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment