aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/logger.rb
blob: 66e8fcadb468ba5f5be1401d9316ac824c4e0c7b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                       
require 'logger'

module ActiveSupport
  class Logger < ::Logger
    def initialize(*args)
      super
      @formatter = SimpleFormatter.new
    end

    # Simple formatter which only displays the message.
    class SimpleFormatter < ::Logger::Formatter
      # This method is invoked when a log event occurs
      def call(severity, timestamp, progname, msg)
        "#{String === msg ? msg : msg.inspect}\n"
      end
    end
  end
end