jmoses_fluent-logger 0.4.9 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/fluent/logger/fluent_logger.rb +1 -1
- data/lib/fluent/logger/version.rb +1 -1
- data/spec/fluent_logger_spec.rb +21 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.10
|
data/spec/fluent_logger_spec.rb
CHANGED
@@ -170,7 +170,7 @@ EOF
|
|
170
170
|
logger_io.read =~ /FluentLogger: Can't convert to msgpack:/
|
171
171
|
}
|
172
172
|
|
173
|
-
it ('batch
|
173
|
+
it ('batch posts') {
|
174
174
|
messages = [
|
175
175
|
['tag1', 'message 1', Time.utc(2008, 9, 1, 10, 5, 0)],
|
176
176
|
['tag2', 'message 2', Time.utc(2008, 9, 1, 10, 6, 0)],
|
@@ -213,6 +213,26 @@ EOF
|
|
213
213
|
batch.should be < single
|
214
214
|
}
|
215
215
|
|
216
|
+
it ('batch posts all events when they are larger than the buffer') {
|
217
|
+
messages = [
|
218
|
+
['tag1', 'message 1', Time.utc(2008, 9, 1, 10, 5, 0)],
|
219
|
+
['tag2', 'message 2', Time.utc(2008, 9, 1, 10, 6, 0)],
|
220
|
+
]
|
221
|
+
|
222
|
+
logger.limit = 50
|
223
|
+
|
224
|
+
logger.batch_post_with_time(messages)
|
225
|
+
wait_transfer
|
226
|
+
|
227
|
+
queue_with_time.should have(2).items
|
228
|
+
queue_with_time.first[0].should eq('logger-test.tag1')
|
229
|
+
queue_with_time.first[1].should eq(1220263500)
|
230
|
+
queue_with_time.first[2].should eq('message 1')
|
231
|
+
queue_with_time.last[0].should eq('logger-test.tag2')
|
232
|
+
queue_with_time.last[1].should eq(1220263560)
|
233
|
+
queue_with_time.last[2].should eq('message 2')
|
234
|
+
}
|
235
|
+
|
216
236
|
it ('should raise an error when second argument is non hash object') {
|
217
237
|
data = 'FooBar'
|
218
238
|
expect {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jmoses_fluent-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yajl-ruby
|
@@ -190,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
segments:
|
192
192
|
- 0
|
193
|
-
hash:
|
193
|
+
hash: -2376272817378893814
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
segments:
|
201
201
|
- 0
|
202
|
-
hash:
|
202
|
+
hash: -2376272817378893814
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project:
|
205
205
|
rubygems_version: 1.8.24
|