fluent-logger 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/VERSION +1 -1
- data/lib/fluent/logger/fluent_logger.rb +9 -9
- data/lib/fluent/logger/version.rb +1 -1
- data/spec/fluent_logger_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 138aa1f6b2e893e052fa4aab33e38ffe50a001da
|
4
|
+
data.tar.gz: d6fb45180e4d79317df370ffd14ef8acb659ffab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b402b52625c8f1676eaece98d86e5aad61fda1d05c0623f926caf9074afdf589efca44851aefdead592212addc4124874ea27903f3861b867ca7336f65f5f47
|
7
|
+
data.tar.gz: 921a3538d1e758502cf9986d2857c5f41e676c5dc5af6a72c57ac08d29e4889c0dbc9e786ef0d855230a29a965efcc0654c1c7e85da0fcbfa71d847c9ab76124
|
data/ChangeLog
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
@@ -181,15 +181,15 @@ module Fluent
|
|
181
181
|
private
|
182
182
|
|
183
183
|
def to_msgpack(msg)
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
184
|
+
@mon.synchronize {
|
185
|
+
res = begin
|
186
|
+
@packer.pack(msg).to_s
|
187
|
+
rescue NoMethodError
|
188
|
+
JSON.parse(JSON.generate(msg)).to_msgpack
|
189
|
+
end
|
190
|
+
@packer.clear
|
191
|
+
res
|
192
|
+
}
|
193
193
|
end
|
194
194
|
|
195
195
|
def suppress_sec
|
data/spec/fluent_logger_spec.rb
CHANGED
@@ -119,6 +119,19 @@ describe Fluent::Logger::FluentLogger do
|
|
119
119
|
expect(logger_data['object']).to be_truthy
|
120
120
|
}
|
121
121
|
|
122
|
+
it ('msgpack unsupport data and support data') {
|
123
|
+
logger.post('tag', {'time' => Time.utc(2008, 9, 1, 10, 5, 0)})
|
124
|
+
logger.post('tag', {'time' => '2008-09-01 10:05:00 UTC'})
|
125
|
+
|
126
|
+
fluentd.wait_transfer
|
127
|
+
|
128
|
+
logger_data1 = fluentd.queue.first.last
|
129
|
+
expect(logger_data1['time']).to eq '2008-09-01 10:05:00 UTC'
|
130
|
+
|
131
|
+
logger_data2 = fluentd.queue.last.last
|
132
|
+
expect(logger_data2['time']).to eq '2008-09-01 10:05:00 UTC'
|
133
|
+
}
|
134
|
+
|
122
135
|
it ('msgpack and JSON unsupport data') {
|
123
136
|
data = {
|
124
137
|
'time' => Time.utc(2008, 9, 1, 10, 5, 0),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|