lumberjack 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/lumberjack/formatter/structured_formatter.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55a35b3e0ea957e0a08049bd7a6b7b6e7373d79983e96a6459f1448b1d3d3dbe
|
4
|
+
data.tar.gz: 4cd9386b842c1686af145ef3f369219d78846aa4f5fd1223b3234b4ae91f63ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81108d71edd9c6ebd0653d5d8e13587bf0a88796f5682d2b9c602c8977c2ade0f343b9fc3086658c3764cd8d8dd3b8f8ccc8b5cf5bf460225f1719a1116e8742
|
7
|
+
data.tar.gz: b7c8f80a651358bb763811d9068c113b72a6948a9e513394a4f456192076e0b654ea101c1c0ce723d14f94f9b574b749ce5f9f9580b3051a8f2cd84d8c1c7a7a
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.3
|
@@ -17,22 +17,25 @@ module Lumberjack
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def call_with_references(obj, references)
|
20
|
-
references << obj
|
21
20
|
if obj.is_a?(Hash)
|
22
21
|
hash = {}
|
22
|
+
references << obj.object_id
|
23
23
|
obj.each do |name, value|
|
24
|
-
next if references.include?(value)
|
24
|
+
next if references.include?(value.object_id)
|
25
25
|
references << value
|
26
26
|
hash[name.to_s] = call_with_references(value, references)
|
27
27
|
end
|
28
|
+
references.delete(obj.object_id)
|
28
29
|
hash
|
29
30
|
elsif obj.is_a?(Enumerable) && obj.respond_to?(:size) && obj.size != Float::INFINITY
|
30
31
|
array = []
|
32
|
+
references << obj.object_id
|
31
33
|
obj.each do |value|
|
32
|
-
next if references.include?(value)
|
34
|
+
next if references.include?(value.object_id)
|
33
35
|
references << value
|
34
36
|
array << call_with_references(value, references)
|
35
37
|
end
|
38
|
+
references.delete(obj.object_id)
|
36
39
|
array
|
37
40
|
elsif @formatter
|
38
41
|
@formatter.format(obj)
|