From 75fa82418d54b36b6092767f2a2b5c1d5324441b Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 10 Dec 2008 18:07:02 -0600 Subject: Prefer Rails.logger over RAILS_DEFAULT_LOGGER --- railties/lib/commands/runner.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'railties/lib') 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 -- cgit v1.2.3