reidmorrison / rails_semantic_logger

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

Be explicit with rails constants in the Engine #123

Closed caius closed 3 years ago

caius commented 3 years ago

Description of changes

We have a rails app where we don't require "rails", but only require a subset of the action/active gems to make it work. (It's a very simple app!)

For some of these if you haven't loaded in the Rails gem, then the classes within RailsSemanticLogger cause the defined? check to pass and then the code to blow up. Instead change the code here to be explicit in checking these are top level constants, not nested ones inside this gem.

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