I'm new to Rails, but I have an existing Rails application for which I would like to change the default directory where it logs. What is the easiest way to do it?
You can specify an explicit logger in your config;
my_logger = ActiveSupport::BufferedLogger.new(path)
config.logger = my_logger
This will replace Rails.logger
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With