diff options
author | Terence Lee <hone02@gmail.com> | 2013-03-15 04:07:22 -0700 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2013-03-15 10:05:10 -0700 |
commit | b7d9d6e2cd5082d269dafbc0316e2107febe1451 (patch) | |
tree | 11766be91ed229cf8bd409f86f2022dd698a560d /activesupport/lib | |
parent | b601399b72ab56cc01368f02615af99f45d14f02 (diff) | |
download | rails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.tar.gz rails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.tar.bz2 rails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.zip |
make new rails apps log 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 |