Hi there.


I know this, although easy, would be a big step. So I'd love to hear your 
thoughts.


I can't remember the last time I needed to open/read log/development.log or 
log/test.log.
This is just consuming disk space unnecessarily (my test.loge easily 
reaches more than 1 GB!).

After talking to some other developers, all of them agreed they don't use 
it as well.


What if we change this behaviour to be optional? It'd still display the 
logs through the STDOUT, though.

I've been doing it in my projects and couldn't find a reason not to do it.


The way I currently do it is similar to what Heroku's rails_12factor gem 
used to do (and now is the default in Rails for *production* environment):


# config/environments/development.rb

# Prevents from writing logs on `log/development.log`

logger           = ActiveSupport::Logger.new(STDOUT)

logger.formatter = config.log_formatter

config.logger    = ActiveSupport::TaggedLogging.new(logger)


# config/environments/test.rb

# Prevents from writing logs on `log/test.log`

config.log_level = :warn

logger           = ActiveSupport::Logger.new(STDOUT)

logger.formatter = config.log_formatter

config.logger    = ActiveSupport::TaggedLogging.new(logger)


Thank you,
Lucas.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to