DEV: configure logster max logs via ENV (#7225)

This commit is contained in:
Osama Sayegh 2019-03-21 16:10:17 +03:00 committed by GitHub
parent 4c6bfb9b39
commit da578e92f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,10 @@ if Rails.env.production?
Logster.config.env_expandable_keys.push(:hostname, :problem_db) Logster.config.env_expandable_keys.push(:hostname, :problem_db)
end end
if GlobalSetting.respond_to?(:max_logster_logs)
Logster.store.max_backlog = GlobalSetting.max_logster_logs
end
# middleware that logs errors sits before multisite # middleware that logs errors sits before multisite
# we need to establish a connection so redis connection is good # we need to establish a connection so redis connection is good
# and db connection is good # and db connection is good