aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-12-25 20:21:14 +0100
committerYves Senn <yves.senn@gmail.com>2012-12-25 20:21:14 +0100
commit8787c6e0e581315c8d3d33b6bb65a6640835456e (patch)
tree0690034028af6c968c0500c8ecb3486dc35778d0 /activesupport/lib
parent95fa0e69de373e741d3797617950c0e2ed76f950 (diff)
downloadrails-8787c6e0e581315c8d3d33b6bb65a6640835456e.tar.gz
rails-8787c6e0e581315c8d3d33b6bb65a6640835456e.tar.bz2
rails-8787c6e0e581315c8d3d33b6bb65a6640835456e.zip
deprecation warning when BufferedLogger is instantiated
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/buffered_logger.rb12
1 files changed, 11 insertions, 1 deletions
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