From 8787c6e0e581315c8d3d33b6bb65a6640835456e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Tue, 25 Dec 2012 20:21:14 +0100 Subject: deprecation warning when BufferedLogger is instantiated --- activesupport/lib/active_support/buffered_logger.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb index 2e63e67262..1cd0c2f790 100644 --- a/activesupport/lib/active_support/buffered_logger.rb +++ b/activesupport/lib/active_support/buffered_logger.rb @@ -3,9 +3,19 @@ require 'active_support/logger' module ActiveSupport class BufferedLogger < Logger + + def initialize(*args) + self.class._deprecation_warning + super + end + def self.inherited(*) - ::ActiveSupport::Deprecation.warn 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.' + _deprecation_warning super end + + def self._deprecation_warning + ::ActiveSupport::Deprecation.warn 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.' + end end end -- cgit v1.2.3