From 7fb62bdab4c1f974e01c855e6e91d0488685099a Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Thu, 13 Jul 2017 11:38:17 -0400 Subject: [PATCH] Enable logging behind ENV var for test mode --- config/environments/test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index b5ac2673c1b..af2eedae623 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -42,6 +42,8 @@ Discourse::Application.configure do config.eager_load = false - config.logger = Logger.new(nil) - config.log_level = :fatal + unless ENV['RAILS_ENABLE_TEST_LOG'] + config.logger = Logger.new(nil) + config.log_level = :fatal + end end