diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 11:52:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-20 11:57:07 -0800 |
commit | e7e1890c49ce645986959aac5ab39607bb22fd53 (patch) | |
tree | 4d495a2bab44e98c443361981a13270df2253171 /activesupport/lib/active_support | |
parent | 04241f38f61a4cd91e4f9bd5378d30b3e2b8db00 (diff) | |
download | rails-e7e1890c49ce645986959aac5ab39607bb22fd53.tar.gz rails-e7e1890c49ce645986959aac5ab39607bb22fd53.tar.bz2 rails-e7e1890c49ce645986959aac5ab39607bb22fd53.zip |
made the broadcast logger quack more like a logger
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/logger.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb index 8288368d8d..3a2646d55f 100644 --- a/activesupport/lib/active_support/logger.rb +++ b/activesupport/lib/active_support/logger.rb @@ -10,6 +10,30 @@ module ActiveSupport @logs = logs end + def progname + logs.first.progname + end + + def progname=(name) + logs.each { |x| x.progname = name } + end + + def formatter + logs.first.formatter + end + + def formatter=(formatter) + logs.each { |x| x.formatter = formatter } + end + + def level + logs.first.level + end + + def level=(level) + logs.each { |x| x.level = level } + end + def add(severity, message = nil, progname = nil, &block) super logs.each { |l| l.add(severity, message, progname, &block) } |