Reputation: 1309
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)
Upvotes: 5
Views: 542
Reputation: 2086
This will do the trick:
config.paths['log'] = 'log/new_log_file.log'
You can read more about paths here: https://api.rubyonrails.org/classes/Rails/Application/Configuration.html#method-i-paths
Upvotes: 4