Skip to content

Doubled errors output #1664

Closed
Closed
@kvokka

Description

Given modular app, with some external logger

class ApplicationController < Sinatra::Base
  enable :logging

  set(:logger) { SomeAwesomeModule.logger }
  configure do
    use ::Rack::CommonLogger, settings.logger
  end

  errors do
    logger.error env['sinatra.error'].message
  end
end

and this will raise output all error in dev & prod environments twice- first time with the logger and the second time from dump_errors extension.

class ApplicationController < Sinatra::Base
  disable :dump_errors

helps to fix it. Maybe it is a feature, which i just did not get. Anyway, i feel like at least issue should be created and/or readme updated. or maybe disable :dump_errors with custom logger.

Anyway, hope this the situation a bit more clear and maybe save someone's else day.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions