lib/loggable/railtie.rb in researchable_loggable-1.5.0 vs lib/loggable/railtie.rb in researchable_loggable-1.5.1

- old
+ new

@@ -17,10 +17,12 @@ # rubocop:disable Metrics/BlockLength initializer :loggable_web, before: :initialize_logger do Rails.application.configure do production_like = Rails.env.production? || config.loggable.production_like if production_like - Loggable::Logfmt::Logger.include_logger_silence if Rails.application.config.assets.quiet + if Rails.application.config.respond_to?(:assets) && Rails.application.config.assets.quiet + Loggable::Logfmt::Logger.include_logger_silence + end Rails.logger = Loggable::Logfmt::Logger.new($stdout) Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase || 'INFO') Loggable::OpenTelemetryConfig.configure(Rails.application.class.module_parent_name.underscore.dasherize) end