Sha256: d5afc307a79389de2b512419c9f5d09da7c85894bc0b9f1efa44e0fc3439896b

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

class Logster::Middleware::DebugExceptions < ActionDispatch::DebugExceptions
  private

  def log_error(env,wrapper)
    exception = wrapper.exception

    Logster.config.current_context.call(env) do
      location = exception.backtrace[0]
      exception_string = exception.to_s

      Rails.logger.add(::Logger::Severity::FATAL,
                        exception.class.to_s << " (" << exception_string << ")\n#{location}",
                        "web-exception",
                        backtrace: exception.backtrace.join("\n"),
                        env: env)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
logster-1.0.0.2.pre lib/logster/middleware/debug_exceptions.rb
logster-1.0.0.1.pre lib/logster/middleware/debug_exceptions.rb