diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-12 11:34:02 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-12 11:34:02 -0700 |
commit | 7f40b9cd429cabad80ef9d8fbe3a169d14bf1dba (patch) | |
tree | ddae0faeef150a1afb83a345e98e1ee008786486 /activesupport/lib | |
parent | 0f5b32cd0804a3fe26027176db57b8fbd9a52108 (diff) | |
download | rails-7f40b9cd429cabad80ef9d8fbe3a169d14bf1dba.tar.gz rails-7f40b9cd429cabad80ef9d8fbe3a169d14bf1dba.tar.bz2 rails-7f40b9cd429cabad80ef9d8fbe3a169d14bf1dba.zip |
make the tagged formatter extend the existing formatter
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index f6ad861353..88fd438448 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -13,7 +13,7 @@ module ActiveSupport # This is used by the default Rails.logger as configured by Railties to make it easy to stamp log lines # with subdomains, request ids, and anything else to aid debugging of multi-user production applications. module TaggedLogging - class Formatter < ActiveSupport::Logger::SimpleFormatter # :nodoc: + module Formatter # :nodoc: # This method is invoked when a log event occurs def call(severity, timestamp, progname, msg) super(severity, timestamp, progname, "#{tags_text}#{msg}") @@ -37,7 +37,7 @@ module ActiveSupport end def self.new(logger) - logger.formatter = Formatter.new + logger.formatter.extend Formatter logger.extend(self) end |