lib/neo4j/core/instrumentable.rb in neo4j-10.0.0.pre.alpha.2 vs lib/neo4j/core/instrumentable.rb in neo4j-10.0.0.pre.alpha.3

- old
+ new

@@ -12,11 +12,11 @@ class_methods do def subscribe_to_request ActiveSupport::Notifications.subscribe('neo4j.core.bolt.request') do |_, start, finish, _id, _payload| ms = (finish - start) * 1000 - yield " #{ANSI::BLUE}BOLT:#{ANSI::CLEAR} #{ANSI::YELLOW}#{ms.round}ms#{ANSI::CLEAR} #{Driver.singleton.url_without_password}" + yield " #{ANSI::BLUE}BOLT:#{ANSI::CLEAR} #{ANSI::YELLOW}#{ms.round}ms#{ANSI::CLEAR} #{ActiveBase.current_driver.url_without_password}" end end def subscribe_to_query ActiveSupport::Notifications.subscribe('neo4j.core.cypher_query') do |_, _start, _finish, _id, payload| @@ -25,10 +25,10 @@ cypher = query.pretty_cypher ? (NEWLINE_W_SPACES if query.pretty_cypher.include?("\n")).to_s + query.pretty_cypher.gsub(/\n/, NEWLINE_W_SPACES) : query.cypher source_line, line_number = Logging.first_external_path_and_line(caller_locations) yield " #{ANSI::CYAN}#{query.context || 'CYPHER'}#{ANSI::CLEAR} #{cypher} #{params_string}" + - ("\n ↳ #{source_line}:#{line_number}" if Driver.singleton.options[:verbose_query_logs] && source_line).to_s + ("\n ↳ #{source_line}:#{line_number}" if ActiveBase.current_driver.options[:verbose_query_logs] && source_line).to_s end end end end end