mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-30 03:50:13 -05:00
Disable httplog
gem in production (#32776)
This commit is contained in:
parent
933fa81baf
commit
d60ef3f17e
2
Gemfile
2
Gemfile
@ -53,7 +53,7 @@ gem 'hiredis', '~> 0.6'
|
|||||||
gem 'htmlentities', '~> 4.3'
|
gem 'htmlentities', '~> 4.3'
|
||||||
gem 'http', '~> 5.2.0'
|
gem 'http', '~> 5.2.0'
|
||||||
gem 'http_accept_language', '~> 2.1'
|
gem 'http_accept_language', '~> 2.1'
|
||||||
gem 'httplog', '~> 1.7.0'
|
gem 'httplog', '~> 1.7.0', require: false
|
||||||
gem 'i18n'
|
gem 'i18n'
|
||||||
gem 'idn-ruby', require: 'idn'
|
gem 'idn-ruby', require: 'idn'
|
||||||
gem 'inline_svg'
|
gem 'inline_svg'
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
HttpLog.configure do |config|
|
# 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.logger = Rails.logger
|
||||||
config.color = { color: :yellow }
|
config.color = { color: :yellow }
|
||||||
config.compact_log = true
|
config.compact_log = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user