diff options
author | Jason Rudolph <github@jasonrudolph.com> | 2011-05-04 18:46:24 -0400 |
---|---|---|
committer | Jason Rudolph <github@jasonrudolph.com> | 2011-05-06 12:21:21 -0400 |
commit | 59982acd632dbfa2b41818b35f81ca65731b5519 (patch) | |
tree | 15d027194b664fb64e5023dd6fbc34ff1247e305 /actionpack/test/dispatch/static_test.rb | |
parent | cae68d221cc81232e30049eafa4ff59b2c5f6010 (diff) | |
download | rails-59982acd632dbfa2b41818b35f81ca65731b5519.tar.gz rails-59982acd632dbfa2b41818b35f81ca65731b5519.tar.bz2 rails-59982acd632dbfa2b41818b35f81ca65731b5519.zip |
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.
Diffstat (limited to 'actionpack/test/dispatch/static_test.rb')
0 files changed, 0 insertions, 0 deletions