diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-25 13:55:37 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-12-25 13:55:37 -0800 |
commit | 227d4e9bdd445f936ff2a2752b4e42d401b6e3cb (patch) | |
tree | 9baf74947bac7266e536624424d586946c932caf /activesupport/lib | |
parent | ea6cddd80dd2b029ffc7a74fe1a799cade0552c9 (diff) | |
parent | 8787c6e0e581315c8d3d33b6bb65a6640835456e (diff) | |
download | rails-227d4e9bdd445f936ff2a2752b4e42d401b6e3cb.tar.gz rails-227d4e9bdd445f936ff2a2752b4e42d401b6e3cb.tar.bz2 rails-227d4e9bdd445f936ff2a2752b4e42d401b6e3cb.zip |
Merge pull request #8608 from senny/8576_cant_inherit_from_deprecated_buffered_logger
deprecation warning when BufferedLogger is instantiated
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/buffered_logger.rb | 12 |
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 |