Sha256: 2aaa1a0685b9d95ca0785586b374de5eff35d4010495dabcb7b68f0f55248c24

Contents?: true

Size: 636 Bytes

Versions: 17

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

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

  def log_error(request_or_env, wrapper)
    env =
      if Rails::VERSION::MAJOR > 4
        request_or_env.env
      else
        request_or_env
      end

    exception = wrapper.exception

    Logster.config.current_context.call(env) do
      Logster.logger.add_with_opts(
        ::Logger::Severity::FATAL,
        "#{exception.class} (#{exception})\n#{wrapper.application_trace.join("\n")}",
        "web-exception",
        backtrace: wrapper.full_trace.join("\n"),
        env: env
      )
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
logster-2.12.2 lib/logster/middleware/debug_exceptions.rb
logster-2.12.1 lib/logster/middleware/debug_exceptions.rb
logster-2.11.4 lib/logster/middleware/debug_exceptions.rb
logster-2.11.3 lib/logster/middleware/debug_exceptions.rb
logster-2.11.2 lib/logster/middleware/debug_exceptions.rb
logster-2.11.1 lib/logster/middleware/debug_exceptions.rb
logster-2.11.0 lib/logster/middleware/debug_exceptions.rb
logster-2.10.1 lib/logster/middleware/debug_exceptions.rb
logster-2.10.0 lib/logster/middleware/debug_exceptions.rb
logster-2.9.8 lib/logster/middleware/debug_exceptions.rb
logster-2.9.7 lib/logster/middleware/debug_exceptions.rb
logster-2.9.6 lib/logster/middleware/debug_exceptions.rb
logster-2.9.5 lib/logster/middleware/debug_exceptions.rb
logster-2.9.4 lib/logster/middleware/debug_exceptions.rb
logster-2.9.3 lib/logster/middleware/debug_exceptions.rb
logster-2.9.2 lib/logster/middleware/debug_exceptions.rb
logster-2.9.1 lib/logster/middleware/debug_exceptions.rb