From b590fe4892d312cbdde350e7c4f8fbbcaf8c61ee Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 24 Dec 2011 10:34:54 -0700 Subject: delegating and deprecating logger#silence. fixes #4159 --- activesupport/lib/active_support/tagged_logging.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/lib/active_support/tagged_logging.rb') diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index 0f3ac0c132..a3a2c48817 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -1,4 +1,5 @@ require 'active_support/core_ext/object/blank' +require 'active_support/deprecation' require 'logger' module ActiveSupport @@ -26,6 +27,11 @@ module ActiveSupport new_tags.size.times { tags.pop } end + def silence(temporary_level = ERROR, &block) + @logger.silience(temporary_level, &block) + end + deprecate :silence + def add(severity, message = nil, progname = nil, &block) @logger.add(severity, "#{tags_text}#{message}", progname, &block) end -- cgit v1.2.3