FIX: Logster backlink config in production (#25685)

Bug introduced in this PR https://github.com/discourse/discourse/pull/25669

Config should apply to development and production modes, not just the development environment.
This commit is contained in:
Krzysztof Kotlarek 2024-02-15 13:48:36 +11:00 committed by GitHub
parent e61a2fc355
commit 52777e2de4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -17,9 +17,6 @@ if Rails.env.development? && !Sidekiq.server? && ENV["RAILS_LOGS_STDOUT"] == "1"
unless ActiveSupport::Logger.logger_outputs_to?(original_logger, STDOUT)
original_logger.extend(ActiveSupport::Logger.broadcast(console))
end
Logster.config.back_to_site_link_path = "#{Discourse.base_path}/admin"
Logster.config.back_to_site_link_text = I18n.t("dashboard.back_from_logster_text")
end
end
@ -63,6 +60,11 @@ if Rails.env.production?
Logster.config.env_expandable_keys.push(:hostname, :problem_db)
end
Rails.application.config.after_initialize do
Logster.config.back_to_site_link_path = "#{Discourse.base_path}/admin"
Logster.config.back_to_site_link_text = I18n.t("dashboard.back_from_logster_text")
end
Logster.store.max_backlog = GlobalSetting.max_logster_logs
# TODO logster should be able to do this automatically