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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdb2dae218ea13bfb25a80b51940a17ec0fbd093
4
- data.tar.gz: 14ab578fbe8291d111e7d6e232ca888ff946cb4c
3
+ metadata.gz: 138aa1f6b2e893e052fa4aab33e38ffe50a001da
4
+ data.tar.gz: d6fb45180e4d79317df370ffd14ef8acb659ffab
5
5
  SHA512:
6
- metadata.gz: d4041f0c836aa5c91aa34e166d7073decb3f2ab795b0a60f408a09c79fd75a81fde148b20fbd1ceb3328b9e9e2cc18fdd872e42ecebab9e49255705c43e7f700
7
- data.tar.gz: 51ae53391e0484ff2ca8dc62c1213c4c4016d1bcbd366de7f4e013341ca09ac0e53a816b7bec2f46d5cfbe092eb2ab716b68ab4b7b885f6bb7fc28a3833726ed
6
+ metadata.gz: 4b402b52625c8f1676eaece98d86e5aad61fda1d05c0623f926caf9074afdf589efca44851aefdead592212addc4124874ea27903f3861b867ca7336f65f5f47
7
+ data.tar.gz: 921a3538d1e758502cf9986d2857c5f41e676c5dc5af6a72c57ac08d29e4889c0dbc9e786ef0d855230a29a965efcc0654c1c7e85da0fcbfa71d847c9ab76124
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.7.1 - 2017/04/19
2
+
3
+ * Fix packer clear bug for non-msgpackable data
4
+
1
5
  Release 0.7.0 - 2017/04/12
2
6
 
3
7
  * Add nanosecond_precision parameter for v0.14
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
@@ -181,15 +181,15 @@ module Fluent
181
181
  private
182
182
 
183
183
  def to_msgpack(msg)
184
- begin
185
- @mon.synchronize {
186
- res = @packer.pack(msg).to_s
187
- @packer.clear
188
- res
189
- }
190
- rescue NoMethodError
191
- JSON.parse(JSON.generate(msg)).to_msgpack
192
- end
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
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Logger
3
3
 
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
 
6
6
  end
7
7
  end
@@ -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.0
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-12 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack