EXPERIMENTAL: Allow lograge to be selected as the logging library.
This commit is contained in:
parent
b1ec4e17d9
commit
90d6677d97
1
Gemfile
1
Gemfile
|
@ -172,6 +172,7 @@ gem 'memory_profiler', require: false, platform: :mri
|
|||
|
||||
gem 'cppjieba_rb', require: false
|
||||
|
||||
gem 'lograge'
|
||||
gem 'logster'
|
||||
|
||||
gem 'sassc', require: false
|
||||
|
|
|
@ -150,6 +150,11 @@ GEM
|
|||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
lograge (0.7.1)
|
||||
actionpack (>= 4, < 5.2)
|
||||
activesupport (>= 4, < 5.2)
|
||||
railties (>= 4, < 5.2)
|
||||
request_store (~> 1.0)
|
||||
logster (1.2.8)
|
||||
loofah (2.1.1)
|
||||
crass (~> 1.0.2)
|
||||
|
@ -290,6 +295,7 @@ GEM
|
|||
redis (3.3.5)
|
||||
redis-namespace (1.5.3)
|
||||
redis (~> 3.0, >= 3.0.4)
|
||||
request_store (1.3.2)
|
||||
rinku (2.0.2)
|
||||
rspec (3.6.0)
|
||||
rspec-core (~> 3.6.0)
|
||||
|
@ -431,6 +437,7 @@ DEPENDENCIES
|
|||
htmlentities
|
||||
http_accept_language (~> 2.0.5)
|
||||
listen
|
||||
lograge
|
||||
logster
|
||||
lru_redux
|
||||
mail
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["ENABLE_LOGRAGE"]
|
||||
Rails.application.configure do
|
||||
config.lograge.enabled = true
|
||||
|
||||
config.lograge.custom_options = lambda do |event|
|
||||
exceptions = %w(controller action format id)
|
||||
{ params: event.payload[:params].except(*exceptions) }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1098,6 +1098,13 @@ developer:
|
|||
bypass_wizard_check:
|
||||
default: false
|
||||
hidden: true
|
||||
logging_provider:
|
||||
hidden: true
|
||||
default: 'default'
|
||||
type: 'list'
|
||||
choices:
|
||||
- 'default'
|
||||
- 'lograge'
|
||||
|
||||
embedding:
|
||||
feed_polling_enabled:
|
||||
|
|
Loading…
Reference in New Issue