diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 3a1a590be8..7ef6532e52 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -662,9 +662,10 @@ module ActiveRecord #:nodoc: # Silences the logger for the duration of the block. def silence result = nil + old_logger_level = logger.level if logger logger.level = Logger::ERROR if logger result = yield - logger.level = Logger::DEBUG if logger + logger.level = old_logger_level if logger return result end |