logjam_agent 0.38.0 → 0.38.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logjam_agent/buffered_logger.rb +1 -0
- data/lib/logjam_agent/version.rb +1 -1
- data/test/json_logging_test.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47422acd5b4e45b015b0409e1c92cbe469fe883f6d7ae92eaa213434822f460c
|
4
|
+
data.tar.gz: 204958e60d5036f5d63c779b7af46dd2705aa6a0ba2be0145bb7c8780c72b849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b55dd07ab0d558ca83236a7971d7cd45116418b026ecf8bb9bc05fb435facd5896584f1f8f9d9e4cc657571001ed2613a4bbadcbd12c253af07cbf96fbba30bb
|
7
|
+
data.tar.gz: 53288566b7cb06d28a5129f71b4bc236569f0f259595ad14a603baa07085d93ebb25ac031e634096206409ec4b0da6b2d4e332f1ff8dfece3ddf89818eb01d23
|
data/lib/logjam_agent/version.rb
CHANGED
data/test/json_logging_test.rb
CHANGED
@@ -100,5 +100,22 @@ module LogjamAgent
|
|
100
100
|
assert_match(/ERROR -- : RuntimeError\(murks\):(\n.*\.rb:\d+:in\s.*)+/, @device.lines.first)
|
101
101
|
end
|
102
102
|
|
103
|
+
def test_can_log_arrays_as_text
|
104
|
+
LogjamAgent.log_format = :text
|
105
|
+
@logger.error([1, 2])
|
106
|
+
assert_equal 1, @lines.size
|
107
|
+
assert_equal([1, 2].to_s, @lines.first.last)
|
108
|
+
assert_equal 1, @device.lines.size
|
109
|
+
assert_match(/ERROR -- : \[1, 2\]\n/, @device.lines.first)
|
110
|
+
end
|
111
|
+
|
112
|
+
def test_can_log_arrays_as_json
|
113
|
+
LogjamAgent.log_format = :json
|
114
|
+
@logger.error([1, 2])
|
115
|
+
assert_equal 1, @lines.size
|
116
|
+
assert_equal([1, 2].to_s, @lines.first.last)
|
117
|
+
assert_equal 1, @device.lines.size
|
118
|
+
assert_match(/ERROR -- : \{"message":"\[1, 2\]"\}\n/, @device.lines.first)
|
119
|
+
end
|
103
120
|
end
|
104
121
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.38.
|
4
|
+
version: 0.38.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|