Module: Neo4j::Core

Defined in:
lib/neo4j-core.rb,
lib/neo4j/core/node.rb,
lib/neo4j/core/path.rb,
lib/neo4j-core/query.rb,
lib/neo4j-core/label.rb,
lib/neo4j/core/label.rb,
lib/neo4j-core/helpers.rb,
lib/neo4j-core/version.rb,
lib/neo4j/core/wrappable.rb,
lib/neo4j/core/relationship.rb,
lib/neo4j-core/query_clauses.rb,
lib/neo4j-core/active_entity.rb,
lib/neo4j/core/cypher_session.rb,
lib/neo4j/core/instrumentable.rb,
lib/neo4j-core/query_find_in_batches.rb,
lib/neo4j/core/cypher_session/result.rb,
lib/neo4j/core/cypher_session/adaptors.rb,
lib/neo4j/core/cypher_session/responses.rb,
lib/neo4j/core/cypher_session/transactions.rb,
lib/neo4j/core/cypher_session/adaptors/bolt.rb,
lib/neo4j/core/cypher_session/adaptors/http.rb,
lib/neo4j/core/cypher_session/responses/bolt.rb,
lib/neo4j/core/cypher_session/responses/http.rb,
lib/neo4j/core/cypher_session/adaptors/has_uri.rb,
lib/neo4j/core/cypher_session/transactions/bolt.rb,
lib/neo4j/core/cypher_session/transactions/http.rb,
lib/neo4j/core/cypher_session/adaptors/embedded.rb,
lib/neo4j/core/cypher_session/responses/embedded.rb,
lib/neo4j/core/cypher_session/transactions/embedded.rb,
lib/neo4j/core/cypher_session/adaptors/bolt/pack_stream.rb

Defined Under Namespace

Modules: ActiveEntity, Config, Instrumentable, PackStream, QueryClauses, QueryFindInBatches, TxMethods, Wrappable Classes: CypherSession, Label, Node, Path, Query, Relationship

Constant Summary

ORIGINAL_FORMATTER =
::Logger::Formatter.new
VERSION =
'7.0.0.alpha.4'

Class Method Summary collapse

Class Method Details

.formatter(severity, datetime, progname, msg) ⇒ Object



40
41
42
43
44
45
46
47
# File 'lib/neo4j-core.rb', line 40

def self.formatter(severity, datetime, progname, msg)
  output = ''
  if Thread.current != Thread.main
    output += "#{ANSI::YELLOW}Thread: #{Thread.current.object_id}: #{ANSI::CLEAR}"
  end
  output += msg
  ORIGINAL_FORMATTER.call(severity, datetime, progname, output)
end

.logger(stream = STDOUT) ⇒ Object



34
35
36
37
38
# File 'lib/neo4j-core.rb', line 34

def self.logger(stream = STDOUT)
  @logger ||= Logger.new(stream).tap do |logger|
    logger.formatter = method(:formatter)
  end
end