0
0
Fork 0

Disable httplog gem in production (#32776)

This commit is contained in:
David Roetzel 2024-11-05 09:55:34 +01:00 committed by GitHub
parent 933fa81baf
commit d60ef3f17e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View file

@ -1,7 +1,12 @@
# frozen_string_literal: true
HttpLog.configure do |config|
config.logger = Rails.logger
config.color = { color: :yellow }
config.compact_log = true
# Disable httplog in production unless log_level is `debug`
if !Rails.env.production? || Rails.configuration.log_level == :debug
require 'httplog'
HttpLog.configure do |config|
config.logger = Rails.logger
config.color = { color: :yellow }
config.compact_log = true
end
end