Skip to content

Commit d301fe3

Browse files
authored
rails 8.1 sql_runtime fix
reidmorrison#276
1 parent b5a03bd commit d301fe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rails_semantic_logger/active_record/log_subscriber.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ class << self
88
end
99

1010
def self.runtime=(value)
11-
::ActiveRecord::RuntimeRegistry.sql_runtime = value
11+
::ActiveRecord::RuntimeRegistry.stats.sql_runtime = value
1212
end
1313

1414
def self.runtime
15-
::ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
15+
::ActiveRecord::RuntimeRegistry.stats.sql_runtime ||= 0
1616
end
1717

1818
def self.reset_runtime

0 commit comments

Comments
 (0)