lib/ab_admin/utils/logger.rb in ab_admin-0.6.1 vs lib/ab_admin/utils/logger.rb in ab_admin-0.7.0
- old
+ new
@@ -1,9 +1,8 @@
module AbAdmin
module Utils
module Logger
-
class ExtendedLogger < ::Logger
def exception(e, options={})
message = "#{e.message} #{"DATA:#{options[:data].inspect}" if options && options[:data]}"
backtrace = e.backtrace.map { |l| "#{' ' * 2}#{l}" }.join("\n")
error("#{e.class} #{message}\n#{backtrace}\n\n")
@@ -17,9 +16,8 @@
def self.for_file(filename)
logger = ExtendedLogger.new(Rails.root.join('log', filename))
logger.formatter = ::Logger::Formatter.new
logger
end
-
end
end
end
\ No newline at end of file