fluent-plugin-barito 0.3.0 → 0.3.1
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/fluent-plugin-barito.gemspec +1 -1
- data/lib/fluent/plugin/barito_timber.rb +0 -9
- data/spec/lib/fluent/plugin/out_barito_k8s_spec.rb +0 -2
- 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: 7b35472a5c56fd8b341b8fe2c91b1baf8168c7d88078bf5e421a03f14b9c0165
|
4
|
+
data.tar.gz: fddfbfea352eaa235c7599df2ac5920d346f47934aeb3fc14631a509195f3b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 409734aba8cc251c54a6cd0e2bb3f2989549f8880d9eb1f58eb2589f79073f989e86bda5f5880dbdd976c4d3fcd4eacd83b2f0c3c13721ca1b66573c88cab01c
|
7
|
+
data.tar.gz: 9d6c49cb7ca58af3a45e0872e7bff01e38fc81002098dc4442ff57a79a1c4833463769554fc5d89769ab398311f5e812e3a9c45153acba470022c650210d267e
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-barito"
|
6
|
-
spec.version = "0.3.
|
6
|
+
spec.version = "0.3.1"
|
7
7
|
spec.authors = ["BaritoLog"]
|
8
8
|
spec.email = ["pushm0v.development@gmail.com", "iman.tung@gmail.com"]
|
9
9
|
|
@@ -22,15 +22,6 @@ class Fluent::Plugin::TimberFactory
|
|
22
22
|
if message.nil? or message.empty?
|
23
23
|
message = record.to_s
|
24
24
|
trail.hints << HINTS_NO_MESSAGE
|
25
|
-
else
|
26
|
-
new_message = nil
|
27
|
-
begin
|
28
|
-
new_message = JSON.parse(message)
|
29
|
-
rescue
|
30
|
-
end
|
31
|
-
if not new_message.nil? and new_message.is_a?(Hash)
|
32
|
-
message = new_message
|
33
|
-
end
|
34
25
|
end
|
35
26
|
|
36
27
|
timber['tag'] = tag
|
@@ -55,11 +55,9 @@ describe 'Fluent::BaritoK8sOutput' do
|
|
55
55
|
it do
|
56
56
|
out = Fluent::BaritoK8sOutput.new
|
57
57
|
|
58
|
-
record = { "log" => "{\"some_attr\":\"info\",\"nested\":{\"nested_attr\":\"nested_value\"}}", "other_attr" => "other_value"}
|
59
58
|
new_record = out.merge_log_attribute(record)
|
60
59
|
|
61
60
|
expect(new_record['some_attr']).to eq("info")
|
62
|
-
expect(new_record['nested']['nested_attr']).to eq("nested_value")
|
63
61
|
expect(new_record['other_attr']).to eq("other_value")
|
64
62
|
end
|
65
63
|
end
|