neo4j-java-driver 0.1.6-java → 0.1.7-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8de6783f6b9df0986d07ffe838b5c8e775087d8a1b21a82ded2ed7d425e82c44
4
- data.tar.gz: b8a70fde051350f5cc2a928eae7c79edd3dde3531e9835d37a5dd0bcd11c3806
3
+ metadata.gz: 3d4d2643c07b9ab4a4c9024160ec58a387aa84d3a78f98570324b71e5e402bcb
4
+ data.tar.gz: c1a94826949cb66c4f17494713a42c1d45ca96f19c25b8e4ec95616c1ddc68b6
5
5
  SHA512:
6
- metadata.gz: eca38d6ff916b633349d23ffd1bb92d54c5b703d459a4820f20174da8a1b31905a15a2be3ba75fac3689faa79c599ce0406b1014ba3e52f2617f0f2cd095db7c
7
- data.tar.gz: b3e7ab6fb4aacdd0bc0dd034db6d5aeb7a2d3246179f4f94b2edbebb5a83a6b82f73ddf73258dd26849ee96307a51126c2caafc4d2fb29088bb7a29e8ad2f5c3
6
+ metadata.gz: 16809c6f5d8a2b5661aef348d5dfe724218d5abc5b1a390edfadd72369570485e36fde82d5976dd0918397722a24f50c6ba39bd5a338839ecd8f2933e4ce6a3d
7
+ data.tar.gz: 4d0601adde419833a1110ec8dea94f31ec4adb6b69c99103eb2511bda9832ce5ee7dc70d9df53a23ac54bb33f02943e8aa0ff38128679fd25d960df8af163c2d
@@ -38,7 +38,6 @@ end
38
38
 
39
39
  Loader.load
40
40
 
41
- ActiveSupport::Logger.prepend Neo4j::Driver::Ext::Logger
42
41
  Java::OrgNeo4jDriverInternal::InternalDriver.prepend Neo4j::Driver::Ext::InternalDriver
43
42
  Java::OrgNeo4jDriverInternal::InternalEntity.include Neo4j::Driver::Ext::MapAccessor
44
43
  Java::OrgNeo4jDriverInternal::InternalNode.prepend Neo4j::Driver::Ext::InternalNode
@@ -38,7 +38,7 @@ module Neo4j
38
38
  unit = java.util.concurrent.TimeUnit::SECONDS
39
39
  when 'logger'
40
40
  method = :with_logging
41
- value = logging(value)
41
+ value = Neo4j::Driver::Ext::Logger.new(value)
42
42
  end
43
43
  [method, value, unit].compact
44
44
  end
@@ -53,20 +53,6 @@ module Neo4j
53
53
  raise ArgumentError
54
54
  end
55
55
  end
56
-
57
- def logging(logger)
58
- Class.new do
59
- include Neo4j::Driver::Logging
60
-
61
- def initialize(logger)
62
- @log = logger
63
- end
64
-
65
- def get_log(_name)
66
- @log
67
- end
68
- end.new(logger)
69
- end
70
56
  end
71
57
  end
72
58
  end
@@ -3,8 +3,19 @@
3
3
  module Neo4j
4
4
  module Driver
5
5
  module Ext
6
- module Logger
7
- # include org.neo4j.driver.v1.Logger
6
+ class Logger
7
+ include org.neo4j.driver.v1.Logger
8
+ include org.neo4j.driver.v1.Logging
9
+
10
+ delegate :debug?, to: :@active_support_logger
11
+
12
+ def initialize(active_support_logger)
13
+ @active_support_logger = active_support_logger
14
+ end
15
+
16
+ def get_log(_name)
17
+ self
18
+ end
8
19
 
9
20
  def error(*args)
10
21
  add(::Logger::ERROR, format(*args))
@@ -34,6 +45,10 @@ module Neo4j
34
45
 
35
46
  private
36
47
 
48
+ def add(level, *args)
49
+ @active_support_logger.add(level) { format(*args) }
50
+ end
51
+
37
52
  def format(*args)
38
53
  args.unshift('%s%n%s') if args.last.is_a? java.lang.Throwable
39
54
  java.lang.String.format(*args)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '0.1.6'
5
+ VERSION = '0.1.7'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-java-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: java
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-01 00:00:00.000000000 Z
11
+ date: 2019-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement