From da578e92f2e70cb79f176e02ced683abe5107426 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Thu, 21 Mar 2019 16:10:17 +0300 Subject: [PATCH] DEV: configure logster max logs via ENV (#7225) --- config/initializers/100-logster.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/initializers/100-logster.rb b/config/initializers/100-logster.rb index a34c4adcab..eeed5005d4 100644 --- a/config/initializers/100-logster.rb +++ b/config/initializers/100-logster.rb @@ -72,6 +72,10 @@ if Rails.env.production? Logster.config.env_expandable_keys.push(:hostname, :problem_db) end +if GlobalSetting.respond_to?(:max_logster_logs) + Logster.store.max_backlog = GlobalSetting.max_logster_logs +end + # middleware that logs errors sits before multisite # we need to establish a connection so redis connection is good # and db connection is good