module Scrivito module Warning def self.warn(message) Rails.logger.warn("[Scrivito] WARNING! #{message}") end def self.error(message, exception=nil) if exception padded_backtrace = exception.backtrace.map { |line| " #{line}" } message += ": #{exception.class.to_s} (#{exception})\n#{padded_backtrace.join("\n")}" end Rails.logger.error("[Scrivito] ERROR! #{message}") end end end