diff --git a/Gemfile.lock b/Gemfile.lock index 238c92d96..723098f0c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -581,7 +581,7 @@ GEM mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) io-console (0.8.0) - irb (1.14.1) + irb (1.14.2) rdoc (>= 4.0.0) reline (>= 0.4.2) iso-639 (0.3.8) @@ -717,11 +717,11 @@ GEM net-protocol net-ssh (7.1.0) nio4r (2.7.4) - nokogiri (1.17.0-arm64-darwin) + nokogiri (1.17.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.17.0-x86_64-darwin) + nokogiri (1.17.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.17.0-x86_64-linux) + nokogiri (1.17.2-x86_64-linux) racc (~> 1.4) normalize-rails (8.0.1) oai (1.2.1) @@ -811,7 +811,7 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.1) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (7.1.5) diff --git a/config/initializers/sequel_active_support_notification.rb b/config/initializers/sequel_active_support_notification.rb deleted file mode 100644 index a44a19605..000000000 --- a/config/initializers/sequel_active_support_notification.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -require "sequel/database/logging" -require "active_support/notifications" - -module Sequel - # Patches Sequel to fire ActiveSupport::Notification events so we can tie that - # into Lograge for JSON logs. - # - # This is pulled nearly verbatim from Sequel::Rails here: - # https://github.com/TalentBox/sequel-rails/blob/aa4df50448650724361746c650d1c326b25bd1fe/lib/sequel_rails/sequel/database/active_support_notification.rb - class Database - def log_connection_yield(sql, conn, args = nil) - sql_for_log = "#{connection_info(conn) if conn && log_connection_info}#{sql}#{"; #{args.inspect}" if args}" - start = Time.now.to_f - begin - if Lograge::Sql.formatter - ::ActiveSupport::Notifications.instrument( - "sql.sequel", - sql: sql, - name: self.class, - binds: args - ) do - yield - end - else - yield - end - rescue => e - log_exception(e, sql_for_log) unless @loggers.empty? - raise - ensure - log_duration(Time.now.to_f - start, sql_for_log) unless e || @loggers.empty? - end - end - - def log_yield(sql, args = nil, &block) - log_connection_yield(sql, nil, args, &block) - end - end -end