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

Deprecation warning with Rails 7 usage of `ActiveSupport::Deprecation` singleton #203

Closed alexmalus closed 2 months ago

alexmalus commented 9 months ago

Environment

Provide at least:

Note:

Expected Behavior

Actual Behavior

Running rails server with a condition causing Rails to cause an exception (like not all migrations being executed) outputs a deprecation warning traced back to this line:

https://github.com/reidmorrison/rails_semantic_logger/blob/93fed9edd0ba21490044e5fc7474c7b83eb2676c/lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb#L10

Snippet from the logs:

Rails -- Exception: ActiveRecord::PendingMigrationError:

[..]

Rails -- DEPRECATION WARNING: Calling silence on ActiveSupport::Deprecation is deprecated and will be removed from Rails (use Rails.application.deprecators.silence instead) (called from log_error at /gem_path/rails_semantic_logger-4.14.0/lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb:10)

Rails 7 deprecated ActiveSupport::Deprecation singleton usage. Mentioned: https://github.com/rails/rails/releases/tag/v7.1.0.beta1 -> Deprecate usage of the singleton ActiveSupport::Deprecation PR where deprecation has been made: https://github.com/rails/rails/pull/47354

Pull Request

~Happy to submit a Pull Request, need the access right.~ I was unaware of https://docs.github.com/en/get-started/quickstart/contributing-to-projects.