diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/commands/runner.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/commands/runner.rb b/railties/lib/commands/runner.rb index 2411c3d270..510128318a 100644 --- a/railties/lib/commands/runner.rb +++ b/railties/lib/commands/runner.rb @@ -48,5 +48,7 @@ begin eval(code_or_file) end ensure - RAILS_DEFAULT_LOGGER.flush if RAILS_DEFAULT_LOGGER + if defined? Rails + Rails.logger.flush if Rails.logger.respond_to?(:flush) + end end |