We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5a03bd commit ce7e781Copy full SHA for ce7e781
lib/rails_semantic_logger/active_record/log_subscriber.rb
@@ -8,11 +8,15 @@ class << self
8
end
9
10
def self.runtime=(value)
11
- ::ActiveRecord::RuntimeRegistry.sql_runtime = value
+ ::ActiveRecord::RuntimeRegistry.respond_to?(:stats) ?
12
+ ::ActiveRecord::RuntimeRegistry.stats.sql_runtime = value :
13
+ ::ActiveRecord::RuntimeRegistry.sql_runtime = value
14
15
16
def self.runtime
- ::ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
17
18
+ ::ActiveRecord::RuntimeRegistry.stats.sql_runtime ||= 0 :
19
+ ::ActiveRecord::RuntimeRegistry.sql_runtime ||= 0
20
21
22
def self.reset_runtime
0 commit comments