mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FEATURE: log to STDOUT using Rails 5 env var (#18880)
Rails introduced a environment variables RAILS_LOG_TO_STDOUT in the template for new projects here: https://github.com/rails/rails/pull/23734 This commit adds the same code to the discourse production environment, making it easy to configure logging to stdout in production for environments which already support log collection via stdout.
This commit is contained in:
parent
5be13f5002
commit
24188beaaf
|
@ -67,4 +67,8 @@ Discourse::Application.configure do
|
|||
end
|
||||
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
||||
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user