mirror of
				https://github.com/discourse/discourse.git
				synced 2025-02-25 18:55:32 -06: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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user