diff options
author | Steve Klabnik <steve@steveklabnik.com> | 2013-03-15 10:09:09 -0700 |
---|---|---|
committer | Steve Klabnik <steve@steveklabnik.com> | 2013-03-15 10:09:09 -0700 |
commit | 9caba4172e91b5be1cd8e056785fbbaa344135a1 (patch) | |
tree | 0f7ec02c0de32bad2b32b7b319813544a47f1634 /activesupport/lib | |
parent | 5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3 (diff) | |
parent | b7d9d6e2cd5082d269dafbc0316e2107febe1451 (diff) | |
download | rails-9caba4172e91b5be1cd8e056785fbbaa344135a1.tar.gz rails-9caba4172e91b5be1cd8e056785fbbaa344135a1.tar.bz2 rails-9caba4172e91b5be1cd8e056785fbbaa344135a1.zip |
Merge pull request #9691 from hone/stdout_logging
Rails default logging to STDOUT
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index 18bc919734..09bfc95231 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -54,6 +54,14 @@ module ActiveSupport end end + def self.create(f, formatter, level) + logger = ActiveSupport::Logger.new f + logger.formatter = formatter + logger = new(logger) + logger.level = ActiveSupport::Logger.const_get(level.to_s.upcase) + logger + end + def self.new(logger) # Ensure we set a default formatter so we aren't extending nil! logger.formatter ||= ActiveSupport::Logger::SimpleFormatter.new |