Skip to content

Commit 1937adf

Browse files
committed
Remove extra logging config
This was confusing as the logger was configured twice in this file. Previous versions of rails didn't log to STDOUT in prod by default, they do now so we can remove this and the log_formatter setting. The formatter is also not used if the logger is set [1] [1] https://guides.rubyonrails.org/configuring.html#config-log-formatter
1 parent afb9d93 commit 1937adf

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

config/environments/production.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,6 @@
8282
# Don't log any deprecations.
8383
config.active_support.report_deprecations = false
8484

85-
# Use default logging formatter so that PID and timestamp are not suppressed.
86-
config.log_formatter = Logger::Formatter.new
87-
88-
# Use a different logger for distributed setups.
89-
# require "syslog/logger"
90-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
91-
92-
if ENV['RAILS_LOG_TO_STDOUT'].present?
93-
logger = ActiveSupport::Logger.new($stdout)
94-
logger.formatter = config.log_formatter
95-
config.logger = ActiveSupport::TaggedLogging.new(logger)
96-
end
97-
9885
# Do not dump schema after migrations.
9986
config.active_record.dump_schema_after_migration = false
10087

0 commit comments

Comments
 (0)