Change the log location (i.e., `LogDevice`) in a Ruby on Rails (version 6) application

Viewed 254

Rails 3 seems to have had a property in config for changing the output location of Rails.logger, config.log_path. That's been deprecated. Looking at a Rails 6 application, is this the way to do that now? Or did this config property get moved to something new?

  logger           = ActiveSupport::Logger.new('log/blahblah.log')
  logger.formatter = config.log_formatter
  config.logger    = ActiveSupport::TaggedLogging.new(logger)
1 Answers
Related