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: avoid false positives during Resque detection #217

Closed FraDim closed 2 months ago

FraDim commented 4 months ago

Issue

When combining Semantic Logger with other gems that use the Resque namespace and the host app does not use the resque gem, Semantic logger causes a failure during the boot up sequence.

Description of changes

The change makes Resque detection more robust in order to avoid a false positive detection and the subsequent failure in the host's app boot up sequence.

This also aligns the detection with other instances of detecting Resque:

https://github.com/reidmorrison/rails_semantic_logger/blob/eadda203513334f850bc0bc809c295d26642649c/lib/rails_semantic_logger/engine.rb#L108

and detecting other forking:

https://github.com/reidmorrison/rails_semantic_logger/blob/eadda203513334f850bc0bc809c295d26642649c/lib/rails_semantic_logger/engine.rb#L245


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