module BammLog::Formatter
Public Instance Methods
call(severity, timestamp, progname, msg)
click to toggle source
# File lib/bamm_log/formatter.rb, line 14 def call(severity, timestamp, progname, msg) Formatter.call_formatted timestamp, Formatter.get_message(msg) end
call_formatted(stamp, msg)
click to toggle source
# File lib/bamm_log/formatter.rb, line 8 def call_formatted(stamp, msg) "[#{stamp.to_s(:log)}] #{msg}\n" end
get_message(msg)
click to toggle source
# File lib/bamm_log/formatter.rb, line 4 def get_message(msg) "#{String === msg ? msg : msg.inspect}" end
included(klass)
click to toggle source
# File lib/bamm_log/formatter.rb, line 12 def included(klass) ::Logger::Formatter.module_eval do def call(severity, timestamp, progname, msg) Formatter.call_formatted timestamp, Formatter.get_message(msg) end end end