diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-06-22 00:35:38 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-22 01:19:02 +0200 |
commit | fd03f1738e089900a4501bdb86fe4aca5354e85e (patch) | |
tree | ffddcabd290fe6a51959b491c6aee10a943c52e2 /activesupport/lib/active_support/core_ext | |
parent | dad71c6099e0e5cfb50f574853255e1abc255c34 (diff) | |
download | rails-fd03f1738e089900a4501bdb86fe4aca5354e85e.tar.gz rails-fd03f1738e089900a4501bdb86fe4aca5354e85e.tar.bz2 rails-fd03f1738e089900a4501bdb86fe4aca5354e85e.zip |
removed default Formatter in logger, not needed with 1.8.7 upwards
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/logger.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/activesupport/lib/active_support/core_ext/logger.rb b/activesupport/lib/active_support/core_ext/logger.rb index c4994ca2ee..d023b4bcff 100644 --- a/activesupport/lib/active_support/core_ext/logger.rb +++ b/activesupport/lib/active_support/core_ext/logger.rb @@ -72,44 +72,6 @@ class Logger @formatter ||= SimpleFormatter.new end - unless const_defined? :Formatter - class Formatter - Format = "%s, [%s#%d] %5s -- %s: %s\n" - - attr_accessor :datetime_format - - def initialize - @datetime_format = nil - end - - def call(severity, time, progname, msg) - Format % [severity[0..0], format_datetime(time), $$, severity, progname, - msg2str(msg)] - end - - private - def format_datetime(time) - if @datetime_format.nil? - time.strftime("%Y-%m-%dT%H:%M:%S.") << "%06d " % time.usec - else - time.strftime(@datetime_format) - end - end - - def msg2str(msg) - case msg - when ::String - msg - when ::Exception - "#{ msg.message } (#{ msg.class })\n" << - (msg.backtrace || []).join("\n") - else - msg.inspect - end - end - end - end - # Simple formatter which only displays the message. class SimpleFormatter < Logger::Formatter # This method is invoked when a log event occurs |