Sha256: 75d5af938d9afd2c35d3a4cfc18d5b117e9097691d8ea28aad2c580a86aa13b4

Contents?: true

Size: 412 Bytes

Versions: 1

Compression:

Stored size: 412 Bytes

Contents

module Moromi
  module Error
    class DefaultLogger
      include Loggerable

      def write(status, title, exception, options, locals)
        return if exception.is_a? Moromi::Error::Default

        messages = ['[ERROR]']
        messages << ([exception.inspect] + (exception&.backtrace || [])).compact.join("\n").gsub("\n", '\n')

        Rails.logger.error(messages.join(' '))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moromi-error-0.1.0 lib/moromi/error/default_logger.rb