1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib
Jason Rudolph 59982acd63 Always flush logger at exit
Prior to this change, running code via script/runner would demonstrate
different logging behavior than running the same code via a rake task.
In production mode the script/runner approach would always flush the
logger, but the rake-based approach would not automatically flush the
logger. This discrepancy violates the principle of least surprise, and
it could lead to the loss of important production logging data.

This change removes special-case code in the "runner" command, and
replaces it with a general solution to ensure that the logger gets
flushed at exit. This solution works for "runner", "console", "server",
rake tasks, and any other process that loads the Rails environment.
2011-05-06 12:21:21 -04:00
..
rails Always flush logger at exit 2011-05-06 12:21:21 -04:00
rails.rb Provide a cleaner syntax for paths configuration that does not rely on method_missing. 2010-10-06 17:20:15 +02:00