reidmorrison / rails_semantic_logger

Rails Semantic Logger replaces the Rails default logger with Semantic Logger
https://logger.rocketjob.io/rails
Apache License 2.0
320 stars 114 forks source link

fix: Ensure the load order of the optional dependency of Rackup #212

Closed NikolayRys closed 2 months ago

NikolayRys commented 5 months ago

Description of changes

rails_semantic logger has an optional dependency on Rackup.

Unfortunately, Bundler doesn't have a concept of an optional dependency, meaning that it doesn't enforce the loading of gems that aren't declared as a requirement in the gemspec. This means that rails_semantic_logger behavior actually depends on the ordering inside the Gemfile, and I don't think that was anyone's intention.

This change force-preloads Rackup if it's available or works a usual if not.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

rgaufman commented 4 months ago

Please merge

FraDim commented 4 months ago

@reidmorrison I think this pull request will resolve

NikolayRys commented 4 months ago

It will indeed, should have noted it in the description 👍