DEV: document max_logster_logs in discourse_defaults.conf

DEV: document max_logster_logs in discourse_defaults.conf

This cleans up logster configuration a bit cause we no longer have to check if we respond_to anything and keeps the logster limit properly documented

Followup on da578e92

diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf
index 421f724..784d395 100644
--- a/config/discourse_defaults.conf
+++ b/config/discourse_defaults.conf
@@ -205,3 +205,6 @@ force_anonymous_min_per_10_seconds = 3
 # flood the queue
 max_old_rebakes_per_15_minutes = 300
 
+# maximum number of log messages in /logs
+max_logster_logs = 1000
+
diff --git a/config/initializers/100-logster.rb b/config/initializers/100-logster.rb
index eeed500..50af0b1 100644
--- a/config/initializers/100-logster.rb
+++ b/config/initializers/100-logster.rb
@@ -72,9 +72,7 @@ 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
+Logster.store.max_backlog = GlobalSetting.max_logster_logs
 
 # middleware that logs errors sits before multisite
 # we need to establish a connection so redis connection is good

GitHub sha: b4188578

1 Like