fluentd 0.10.41 → 0.10.42
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/ChangeLog +9 -0
- data/lib/fluent/buffer.rb +5 -1
- data/lib/fluent/config.rb +7 -7
- data/lib/fluent/output.rb +4 -3
- data/lib/fluent/parser.rb +86 -1
- data/lib/fluent/plugin/in_syslog.rb +62 -7
- data/lib/fluent/version.rb +1 -1
- data/test/config.rb +44 -0
- data/test/parser.rb +28 -0
- data/test/plugin/in_syslog.rb +45 -7
- metadata +27 -50
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1f0356ea605c03d2a1bdac6b5d0c391efbc7d1d0
|
4
|
+
data.tar.gz: 07fe0fcd40f444925cc19e080bbf942459ef85bb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 29d1063e514fb7c48335b86ab5eb78b2433b463e0869a64d6338dce96ddc1ebcb2e1350584ee0dbb65277adfdced6dfc1504df649c90a4748663480565f6b32b
|
7
|
+
data.tar.gz: 077b8961c275cf7277f93d70d2220bdfff7abbf5a2094dffa7e774199cbe618ca57f9f9707999d158c0fd48982655c2fde206848e5b3e6cff5ca67b9443332d6
|
data/ChangeLog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
Release 0.10.42 - 2013/12/25
|
2
|
+
|
3
|
+
* parser/in_tail: Add 'types' and related parameters to convert record value type
|
4
|
+
* in_syslog: Add 'protocol_type' option for TCP support.
|
5
|
+
* Buffer: Extract 'storable?' method for hook judge mechanizm by 3rd-party buffer plugins.
|
6
|
+
* Output: Add 'try_flush_interval' parameter for high frequency flush.
|
7
|
+
It is undocumented because almost users never need this feature.
|
8
|
+
* Change configuration unused checking to prevent memory leak when a plugin accesses configuratino keys.
|
9
|
+
|
1
10
|
Release 0.10.41 - 2013/12/05
|
2
11
|
|
3
12
|
* BufferedOutput: Add 'max_retry_wait' to limit retry interval
|
data/lib/fluent/buffer.rb
CHANGED
@@ -158,13 +158,17 @@ module Fluent
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
+
def storable?(chunk, data)
|
162
|
+
chunk.size + data.bytesize <= @buffer_chunk_limit
|
163
|
+
end
|
164
|
+
|
161
165
|
def emit(key, data, chain)
|
162
166
|
key = key.to_s
|
163
167
|
|
164
168
|
synchronize do
|
165
169
|
top = (@map[key] ||= new_chunk(key)) # TODO generate unique chunk id
|
166
170
|
|
167
|
-
if top
|
171
|
+
if storable?(top, data)
|
168
172
|
chain.next
|
169
173
|
top << data
|
170
174
|
return false
|
data/lib/fluent/config.rb
CHANGED
@@ -25,7 +25,7 @@ module Fluent
|
|
25
25
|
|
26
26
|
module Config
|
27
27
|
class Element < Hash
|
28
|
-
def initialize(name, arg, attrs, elements,
|
28
|
+
def initialize(name, arg, attrs, elements, unused=nil)
|
29
29
|
@name = name
|
30
30
|
@arg = arg
|
31
31
|
@elements = elements
|
@@ -33,10 +33,10 @@ module Fluent
|
|
33
33
|
attrs.each {|k,v|
|
34
34
|
self[k] = v
|
35
35
|
}
|
36
|
-
@
|
36
|
+
@unused = unused || attrs.keys
|
37
37
|
end
|
38
38
|
|
39
|
-
attr_accessor :name, :arg, :elements, :
|
39
|
+
attr_accessor :name, :arg, :elements, :unused
|
40
40
|
|
41
41
|
def add_element(name, arg='')
|
42
42
|
e = Element.new(name, arg, {}, [])
|
@@ -45,22 +45,22 @@ module Fluent
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def +(o)
|
48
|
-
Element.new(@name.dup, @arg.dup, o.merge(self), @elements+o.elements, @
|
48
|
+
Element.new(@name.dup, @arg.dup, o.merge(self), @elements+o.elements, (@unused+o.unused).uniq)
|
49
49
|
end
|
50
50
|
|
51
51
|
def has_key?(key)
|
52
|
-
@
|
52
|
+
@unused.delete(key)
|
53
53
|
super
|
54
54
|
end
|
55
55
|
|
56
56
|
def [](key)
|
57
|
-
@
|
57
|
+
@unused.delete(key)
|
58
58
|
super
|
59
59
|
end
|
60
60
|
|
61
61
|
def check_not_fetched(&block)
|
62
62
|
each_key {|key|
|
63
|
-
|
63
|
+
if @unused.include?(key)
|
64
64
|
block.call(key, self)
|
65
65
|
end
|
66
66
|
}
|
data/lib/fluent/output.rb
CHANGED
@@ -172,6 +172,7 @@ module Fluent
|
|
172
172
|
|
173
173
|
config_param :buffer_type, :string, :default => 'memory'
|
174
174
|
config_param :flush_interval, :time, :default => 60
|
175
|
+
config_param :try_flush_interval, :float, :default => 1
|
175
176
|
config_param :retry_limit, :integer, :default => 17
|
176
177
|
config_param :retry_wait, :time, :default => 1.0
|
177
178
|
config_param :max_retry_wait, :time, :default => nil
|
@@ -277,7 +278,7 @@ module Fluent
|
|
277
278
|
end
|
278
279
|
end
|
279
280
|
if empty
|
280
|
-
return time +
|
281
|
+
return time + @try_flush_interval
|
281
282
|
end
|
282
283
|
|
283
284
|
begin
|
@@ -288,7 +289,7 @@ module Fluent
|
|
288
289
|
if retrying = !@error_history.empty? # re-check in synchronize
|
289
290
|
if @next_retry_time >= time
|
290
291
|
# allow retrying for only one thread
|
291
|
-
return time +
|
292
|
+
return time + @try_flush_interval
|
292
293
|
end
|
293
294
|
# assume next retry failes and
|
294
295
|
# clear them if when it succeeds
|
@@ -316,7 +317,7 @@ module Fluent
|
|
316
317
|
if has_next
|
317
318
|
return Engine.now + @queued_chunk_flush_interval
|
318
319
|
else
|
319
|
-
return time +
|
320
|
+
return time + @try_flush_interval
|
320
321
|
end
|
321
322
|
|
322
323
|
rescue => e
|
data/lib/fluent/parser.rb
CHANGED
@@ -51,8 +51,78 @@ module Fluent
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
module TypeConverter
|
55
|
+
Converters = {
|
56
|
+
'string' => lambda { |v| v.to_s },
|
57
|
+
'integer' => lambda { |v| v.to_i },
|
58
|
+
'float' => lambda { |v| v.to_f },
|
59
|
+
'bool' => lambda { |v|
|
60
|
+
case v.downcase
|
61
|
+
when 'true', 'yes', '1'
|
62
|
+
true
|
63
|
+
else
|
64
|
+
false
|
65
|
+
end
|
66
|
+
},
|
67
|
+
'time' => lambda { |v, time_parser|
|
68
|
+
time_parser.parse(v)
|
69
|
+
},
|
70
|
+
'array' => lambda { |v, delimiter|
|
71
|
+
v.to_s.split(delimiter)
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
def self.included(klass)
|
76
|
+
klass.instance_eval {
|
77
|
+
config_param :types, :string, :default => nil
|
78
|
+
config_param :types_delimiter, :string, :default => ','
|
79
|
+
config_param :types_label_delimiter, :string, :default => ':'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
def configure(conf)
|
84
|
+
super
|
85
|
+
|
86
|
+
@type_converters = parse_types_parameter unless @types.nil?
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
|
91
|
+
def convert_type(name, value)
|
92
|
+
converter = @type_converters[name]
|
93
|
+
converter.nil? ? value : converter.call(value)
|
94
|
+
end
|
95
|
+
|
96
|
+
def parse_types_parameter
|
97
|
+
converters = {}
|
98
|
+
|
99
|
+
@types.split(@types_delimiter).each { |pattern_name|
|
100
|
+
name, type, format = pattern_name.split(@types_label_delimiter, 3)
|
101
|
+
raise ConfigError, "Type is needed" if type.nil?
|
102
|
+
|
103
|
+
case type
|
104
|
+
when 'time'
|
105
|
+
t_parser = TimeParser.new(format)
|
106
|
+
converters[name] = lambda { |v|
|
107
|
+
Converters[type].call(v, t_parser)
|
108
|
+
}
|
109
|
+
when 'array'
|
110
|
+
delimiter = format || ','
|
111
|
+
converters[name] = lambda { |v|
|
112
|
+
Converters[type].call(v, delimiter)
|
113
|
+
}
|
114
|
+
else
|
115
|
+
converters[name] = Converters[type]
|
116
|
+
end
|
117
|
+
}
|
118
|
+
|
119
|
+
converters
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
54
123
|
class RegexpParser
|
55
124
|
include Configurable
|
125
|
+
include TypeConverter
|
56
126
|
|
57
127
|
config_param :time_format, :string, :default => nil
|
58
128
|
|
@@ -83,7 +153,11 @@ module Fluent
|
|
83
153
|
when "time"
|
84
154
|
time = @mutex.synchronize { @time_parser.parse(value) }
|
85
155
|
else
|
86
|
-
record[name] =
|
156
|
+
record[name] = if @type_converters.nil?
|
157
|
+
value
|
158
|
+
else
|
159
|
+
convert_type(name, value)
|
160
|
+
end
|
87
161
|
end
|
88
162
|
end
|
89
163
|
}
|
@@ -131,6 +205,7 @@ module Fluent
|
|
131
205
|
|
132
206
|
class ValuesParser
|
133
207
|
include Configurable
|
208
|
+
include TypeConverter
|
134
209
|
|
135
210
|
config_param :keys, :string
|
136
211
|
config_param :time_key, :string, :default => nil
|
@@ -163,8 +238,18 @@ module Fluent
|
|
163
238
|
time = Engine.now
|
164
239
|
end
|
165
240
|
|
241
|
+
convert_field_type!(record) if @type_converters
|
242
|
+
|
166
243
|
return time, record
|
167
244
|
end
|
245
|
+
|
246
|
+
private
|
247
|
+
|
248
|
+
def convert_field_type!(record)
|
249
|
+
record.each { |key, value|
|
250
|
+
record[key] = convert_type(key, value)
|
251
|
+
}
|
252
|
+
end
|
168
253
|
end
|
169
254
|
|
170
255
|
class TSVParser < ValuesParser
|
@@ -63,12 +63,23 @@ module Fluent
|
|
63
63
|
|
64
64
|
def initialize
|
65
65
|
super
|
66
|
+
require 'cool.io'
|
66
67
|
require 'fluent/plugin/socket_util'
|
67
68
|
end
|
68
69
|
|
69
70
|
config_param :port, :integer, :default => 5140
|
70
71
|
config_param :bind, :string, :default => '0.0.0.0'
|
71
72
|
config_param :tag, :string
|
73
|
+
config_param :protocol_type, :default => :udp do |val|
|
74
|
+
case val.downcase
|
75
|
+
when 'tcp'
|
76
|
+
:tcp
|
77
|
+
when 'udp'
|
78
|
+
:udp
|
79
|
+
else
|
80
|
+
raise ConfigError, "syslog input protocol type should be 'tcp' or 'udp'"
|
81
|
+
end
|
82
|
+
end
|
72
83
|
|
73
84
|
def configure(conf)
|
74
85
|
super
|
@@ -78,6 +89,7 @@ module Fluent
|
|
78
89
|
@parser = parser
|
79
90
|
else
|
80
91
|
@parser = nil
|
92
|
+
@time_parser = TextParser::TimeParser.new(TIME_FORMAT)
|
81
93
|
end
|
82
94
|
end
|
83
95
|
|
@@ -89,12 +101,7 @@ module Fluent
|
|
89
101
|
end
|
90
102
|
|
91
103
|
@loop = Coolio::Loop.new
|
92
|
-
|
93
|
-
$log.debug "listening syslog socket on #{@bind}:#{@port}"
|
94
|
-
@usock = SocketUtil.create_udp_socket(@bind)
|
95
|
-
@usock.bind(@bind, @port)
|
96
|
-
|
97
|
-
@handler = UdpHandler.new(@usock, callback)
|
104
|
+
@handler = listen(callback)
|
98
105
|
@loop.attach(@handler)
|
99
106
|
|
100
107
|
@thread = Thread.new(&method(:run))
|
@@ -153,7 +160,7 @@ module Fluent
|
|
153
160
|
when "pri"
|
154
161
|
pri = value.to_i
|
155
162
|
when "time"
|
156
|
-
time =
|
163
|
+
time = @time_parser.parse(value.gsub(/ +/, ' '))
|
157
164
|
else
|
158
165
|
record[name] = value
|
159
166
|
end
|
@@ -170,6 +177,18 @@ module Fluent
|
|
170
177
|
end
|
171
178
|
|
172
179
|
private
|
180
|
+
|
181
|
+
def listen(callback)
|
182
|
+
$log.debug "listening syslog socket on #{@bind}:#{@port} with #{@protocol_type}"
|
183
|
+
if @protocol_type == :udp
|
184
|
+
@usock = SocketUtil.create_udp_socket(@bind)
|
185
|
+
@usock.bind(@bind, @port)
|
186
|
+
UdpHandler.new(@usock, callback)
|
187
|
+
else
|
188
|
+
Coolio::TCPServer.new(@bind, @port, TcpHandler, callback)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
173
192
|
def emit(pri, time, record)
|
174
193
|
facility = FACILITY_MAP[pri >> 3]
|
175
194
|
priority = PRIORITY_MAP[pri & 0b111]
|
@@ -198,5 +217,41 @@ module Fluent
|
|
198
217
|
# TODO log?
|
199
218
|
end
|
200
219
|
end
|
220
|
+
|
221
|
+
class TcpHandler < Coolio::Socket
|
222
|
+
def initialize(io, on_message)
|
223
|
+
super(io)
|
224
|
+
if io.is_a?(TCPSocket)
|
225
|
+
opt = [1, @timeout.to_i].pack('I!I!') # { int l_onoff; int l_linger; }
|
226
|
+
io.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, opt)
|
227
|
+
end
|
228
|
+
$log.trace { "accepted fluent socket object_id=#{self.object_id}" }
|
229
|
+
@on_message = on_message
|
230
|
+
@buffer = "".force_encoding('ASCII-8BIT')
|
231
|
+
end
|
232
|
+
|
233
|
+
def on_connect
|
234
|
+
end
|
235
|
+
|
236
|
+
def on_read(data)
|
237
|
+
@buffer << data
|
238
|
+
pos = 0
|
239
|
+
|
240
|
+
# syslog family add "\n" to each message and this seems only way to split messages in tcp stream
|
241
|
+
while i = @buffer.index("\n", pos)
|
242
|
+
msg = @buffer[pos..i]
|
243
|
+
@on_message.call(msg)
|
244
|
+
pos = i + 1
|
245
|
+
end
|
246
|
+
@buffer.slice!(0, pos) if pos > 0
|
247
|
+
rescue => e
|
248
|
+
$log.error "syslog error", :error => e, :error_class => e.class
|
249
|
+
close
|
250
|
+
end
|
251
|
+
|
252
|
+
def on_close
|
253
|
+
$log.trace { "closed fluent socket object_id=#{self.object_id}" }
|
254
|
+
end
|
255
|
+
end
|
201
256
|
end
|
202
257
|
end
|
data/lib/fluent/version.rb
CHANGED
data/test/config.rb
CHANGED
@@ -58,6 +58,50 @@ class ConfigTest < Test::Unit::TestCase
|
|
58
58
|
|
59
59
|
end
|
60
60
|
|
61
|
+
def test_check_not_fetchd
|
62
|
+
write_config "#{TMP_DIR}/config_test_not_fetched.conf", %[
|
63
|
+
<match dummy>
|
64
|
+
type rewrite
|
65
|
+
add_prefix filtered
|
66
|
+
<rule>
|
67
|
+
key path
|
68
|
+
pattern ^[A-Z]+
|
69
|
+
replace
|
70
|
+
</rule>
|
71
|
+
</match>
|
72
|
+
]
|
73
|
+
root_conf = Config.read("#{TMP_DIR}/config_test_not_fetched.conf")
|
74
|
+
match_conf = root_conf.elements.first
|
75
|
+
rule_conf = match_conf.elements.first
|
76
|
+
|
77
|
+
not_fetched = []; root_conf.check_not_fetched {|key, e| not_fetched << key }
|
78
|
+
assert_equal %w[type add_prefix key pattern replace], not_fetched
|
79
|
+
|
80
|
+
not_fetched = []; match_conf.check_not_fetched {|key, e| not_fetched << key }
|
81
|
+
assert_equal %w[type add_prefix key pattern replace], not_fetched
|
82
|
+
|
83
|
+
not_fetched = []; rule_conf.check_not_fetched {|key, e| not_fetched << key }
|
84
|
+
assert_equal %w[key pattern replace], not_fetched
|
85
|
+
|
86
|
+
# accessing should delete
|
87
|
+
match_conf['type']
|
88
|
+
rule_conf['key']
|
89
|
+
|
90
|
+
not_fetched = []; root_conf.check_not_fetched {|key, e| not_fetched << key }
|
91
|
+
assert_equal %w[add_prefix pattern replace], not_fetched
|
92
|
+
|
93
|
+
not_fetched = []; match_conf.check_not_fetched {|key, e| not_fetched << key }
|
94
|
+
assert_equal %w[add_prefix pattern replace], not_fetched
|
95
|
+
|
96
|
+
not_fetched = []; rule_conf.check_not_fetched {|key, e| not_fetched << key }
|
97
|
+
assert_equal %w[pattern replace], not_fetched
|
98
|
+
|
99
|
+
# repeateadly accessing should not grow memory usage
|
100
|
+
before_size = match_conf.unused.size
|
101
|
+
10.times { match_conf['type'] }
|
102
|
+
assert_equal before_size, match_conf.unused.size
|
103
|
+
end
|
104
|
+
|
61
105
|
def write_config(path, data)
|
62
106
|
FileUtils.mkdir_p(File.dirname(path))
|
63
107
|
File.open(path, "w") {|f| f.write data }
|
data/test/parser.rb
CHANGED
@@ -41,6 +41,34 @@ module ParserTest
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
class RegexpParserTest < ::Test::Unit::TestCase
|
45
|
+
include ParserTest
|
46
|
+
|
47
|
+
def internal_test_case(parser)
|
48
|
+
time, record = parser.call('192.168.0.1 - - [28/Feb/2013:12:00:00 +0900] [14/Feb/2013:12:00:00 +0900] "true /,/user HTTP/1.1" 200 777')
|
49
|
+
|
50
|
+
assert_equal(str2time('28/Feb/2013:12:00:00 +0900', '%d/%b/%Y:%H:%M:%S %z'), time)
|
51
|
+
assert_equal({
|
52
|
+
'user' => '-',
|
53
|
+
'flag' => true,
|
54
|
+
'code' => 200.0,
|
55
|
+
'size' => 777,
|
56
|
+
'date' => str2time('14/Feb/2013:12:00:00 +0900', '%d/%b/%Y:%H:%M:%S %z'),
|
57
|
+
'host' => '192.168.0.1',
|
58
|
+
'path' => ['/', '/user']
|
59
|
+
}, record)
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_call_with_typed
|
63
|
+
# Use Regexp.new instead of // literal to avoid different parser behaviour in 1.9 and 2.0
|
64
|
+
internal_test_case(TextParser::RegexpParser.new(Regexp.new(%q!^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] \[(?<date>[^\]]*)\] "(?<flag>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)$!), 'time_format'=>"%d/%b/%Y:%H:%M:%S %z", 'types'=>'user:string,date:time:%d/%b/%Y:%H:%M:%S %z,flag:bool,path:array,code:float,size:integer'))
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_call_with_typed_and_name_separator
|
68
|
+
internal_test_case(TextParser::RegexpParser.new(Regexp.new(%q!^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] \[(?<date>[^\]]*)\] "(?<flag>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)$!), 'time_format'=>"%d/%b/%Y:%H:%M:%S %z", 'types'=>'user|string,date|time|%d/%b/%Y:%H:%M:%S %z,flag|bool,path|array,code|float,size|integer', 'types_label_delimiter'=>'|'))
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
44
72
|
class ApacheParserTest < ::Test::Unit::TestCase
|
45
73
|
include ParserTest
|
46
74
|
|
data/test/plugin/in_syslog.rb
CHANGED
@@ -65,11 +65,7 @@ class SyslogInputTest < Test::Unit::TestCase
|
|
65
65
|
|
66
66
|
def test_msg_size
|
67
67
|
d = create_driver
|
68
|
-
|
69
|
-
tests = [
|
70
|
-
{'msg' => '<6>Sep 10 00:00:00 localhost logger: ' + 'x' * 100, 'expected' => 'x' * 100},
|
71
|
-
{'msg' => '<6>Sep 10 00:00:00 localhost logger: ' + 'x' * 1024, 'expected' => 'x' * 1024},
|
72
|
-
]
|
68
|
+
tests = create_test_case
|
73
69
|
|
74
70
|
d.run do
|
75
71
|
u = UDPSocket.new
|
@@ -80,10 +76,52 @@ class SyslogInputTest < Test::Unit::TestCase
|
|
80
76
|
sleep 1
|
81
77
|
end
|
82
78
|
|
83
|
-
|
79
|
+
compare_test_result(d.emits, tests)
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_msg_size_with_tcp
|
83
|
+
d = create_driver([CONFIG, 'protocol_type tcp'].join("\n"))
|
84
|
+
tests = create_test_case
|
85
|
+
|
86
|
+
d.run do
|
87
|
+
tests.each {|test|
|
88
|
+
TCPSocket.open('127.0.0.1', PORT) do |s|
|
89
|
+
s.send(test['msg'], 0)
|
90
|
+
end
|
91
|
+
}
|
92
|
+
sleep 1
|
93
|
+
end
|
94
|
+
|
95
|
+
compare_test_result(d.emits, tests)
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_msg_size_with_same_tcp_connection
|
99
|
+
d = create_driver([CONFIG, 'protocol_type tcp'].join("\n"))
|
100
|
+
tests = create_test_case
|
101
|
+
|
102
|
+
d.run do
|
103
|
+
TCPSocket.open('127.0.0.1', PORT) do |s|
|
104
|
+
tests.each {|test|
|
105
|
+
s.send(test['msg'], 0)
|
106
|
+
}
|
107
|
+
end
|
108
|
+
sleep 1
|
109
|
+
end
|
110
|
+
|
111
|
+
compare_test_result(d.emits, tests)
|
112
|
+
end
|
113
|
+
|
114
|
+
def create_test_case
|
115
|
+
# actual syslog message has "\n"
|
116
|
+
[
|
117
|
+
{'msg' => '<6>Sep 10 00:00:00 localhost logger: ' + 'x' * 100 + "\n", 'expected' => 'x' * 100},
|
118
|
+
{'msg' => '<6>Sep 10 00:00:00 localhost logger: ' + 'x' * 1024 + "\n", 'expected' => 'x' * 1024},
|
119
|
+
]
|
120
|
+
end
|
121
|
+
|
122
|
+
def compare_test_result(emits, tests)
|
84
123
|
emits.each_index {|i|
|
85
124
|
assert_equal(tests[i]['expected'], emits[i][2]['message'])
|
86
125
|
}
|
87
126
|
end
|
88
127
|
end
|
89
|
-
|
metadata
CHANGED
@@ -1,34 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
5
|
-
prerelease:
|
4
|
+
version: 0.10.42
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sadayuki Furuhashi
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: msgpack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.4.4
|
22
|
-
- -
|
20
|
+
- - '!='
|
23
21
|
- !ruby/object:Gem::Version
|
24
22
|
version: 0.5.0
|
25
|
-
- -
|
23
|
+
- - '!='
|
26
24
|
- !ruby/object:Gem::Version
|
27
25
|
version: 0.5.1
|
28
|
-
- -
|
26
|
+
- - '!='
|
29
27
|
- !ruby/object:Gem::Version
|
30
28
|
version: 0.5.2
|
31
|
-
- -
|
29
|
+
- - '!='
|
32
30
|
- !ruby/object:Gem::Version
|
33
31
|
version: 0.5.3
|
34
32
|
- - <
|
@@ -37,21 +35,20 @@ dependencies:
|
|
37
35
|
type: :runtime
|
38
36
|
prerelease: false
|
39
37
|
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
38
|
requirements:
|
42
|
-
- -
|
39
|
+
- - '>='
|
43
40
|
- !ruby/object:Gem::Version
|
44
41
|
version: 0.4.4
|
45
|
-
- -
|
42
|
+
- - '!='
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: 0.5.0
|
48
|
-
- -
|
45
|
+
- - '!='
|
49
46
|
- !ruby/object:Gem::Version
|
50
47
|
version: 0.5.1
|
51
|
-
- -
|
48
|
+
- - '!='
|
52
49
|
- !ruby/object:Gem::Version
|
53
50
|
version: 0.5.2
|
54
|
-
- -
|
51
|
+
- - '!='
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 0.5.3
|
57
54
|
- - <
|
@@ -60,23 +57,20 @@ dependencies:
|
|
60
57
|
- !ruby/object:Gem::Dependency
|
61
58
|
name: json
|
62
59
|
requirement: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
60
|
requirements:
|
65
|
-
- -
|
61
|
+
- - '>='
|
66
62
|
- !ruby/object:Gem::Version
|
67
63
|
version: 1.4.3
|
68
64
|
type: :runtime
|
69
65
|
prerelease: false
|
70
66
|
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
67
|
requirements:
|
73
|
-
- -
|
68
|
+
- - '>='
|
74
69
|
- !ruby/object:Gem::Version
|
75
70
|
version: 1.4.3
|
76
71
|
- !ruby/object:Gem::Dependency
|
77
72
|
name: yajl-ruby
|
78
73
|
requirement: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
74
|
requirements:
|
81
75
|
- - ~>
|
82
76
|
- !ruby/object:Gem::Version
|
@@ -84,7 +78,6 @@ dependencies:
|
|
84
78
|
type: :runtime
|
85
79
|
prerelease: false
|
86
80
|
version_requirements: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
81
|
requirements:
|
89
82
|
- - ~>
|
90
83
|
- !ruby/object:Gem::Version
|
@@ -92,7 +85,6 @@ dependencies:
|
|
92
85
|
- !ruby/object:Gem::Dependency
|
93
86
|
name: cool.io
|
94
87
|
requirement: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
88
|
requirements:
|
97
89
|
- - ~>
|
98
90
|
- !ruby/object:Gem::Version
|
@@ -100,7 +92,6 @@ dependencies:
|
|
100
92
|
type: :runtime
|
101
93
|
prerelease: false
|
102
94
|
version_requirements: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
95
|
requirements:
|
105
96
|
- - ~>
|
106
97
|
- !ruby/object:Gem::Version
|
@@ -108,7 +99,6 @@ dependencies:
|
|
108
99
|
- !ruby/object:Gem::Dependency
|
109
100
|
name: http_parser.rb
|
110
101
|
requirement: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
102
|
requirements:
|
113
103
|
- - ~>
|
114
104
|
- !ruby/object:Gem::Version
|
@@ -116,7 +106,6 @@ dependencies:
|
|
116
106
|
type: :runtime
|
117
107
|
prerelease: false
|
118
108
|
version_requirements: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
109
|
requirements:
|
121
110
|
- - ~>
|
122
111
|
- !ruby/object:Gem::Version
|
@@ -124,65 +113,57 @@ dependencies:
|
|
124
113
|
- !ruby/object:Gem::Dependency
|
125
114
|
name: rake
|
126
115
|
requirement: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
116
|
requirements:
|
129
|
-
- -
|
117
|
+
- - '>='
|
130
118
|
- !ruby/object:Gem::Version
|
131
119
|
version: 0.9.2
|
132
120
|
type: :development
|
133
121
|
prerelease: false
|
134
122
|
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
none: false
|
136
123
|
requirements:
|
137
|
-
- -
|
124
|
+
- - '>='
|
138
125
|
- !ruby/object:Gem::Version
|
139
126
|
version: 0.9.2
|
140
127
|
- !ruby/object:Gem::Dependency
|
141
128
|
name: parallel_tests
|
142
129
|
requirement: !ruby/object:Gem::Requirement
|
143
|
-
none: false
|
144
130
|
requirements:
|
145
|
-
- -
|
131
|
+
- - '>='
|
146
132
|
- !ruby/object:Gem::Version
|
147
133
|
version: 0.15.3
|
148
134
|
type: :development
|
149
135
|
prerelease: false
|
150
136
|
version_requirements: !ruby/object:Gem::Requirement
|
151
|
-
none: false
|
152
137
|
requirements:
|
153
|
-
- -
|
138
|
+
- - '>='
|
154
139
|
- !ruby/object:Gem::Version
|
155
140
|
version: 0.15.3
|
156
141
|
- !ruby/object:Gem::Dependency
|
157
142
|
name: rr
|
158
143
|
requirement: !ruby/object:Gem::Requirement
|
159
|
-
none: false
|
160
144
|
requirements:
|
161
|
-
- -
|
145
|
+
- - '>='
|
162
146
|
- !ruby/object:Gem::Version
|
163
147
|
version: 1.0.0
|
164
148
|
type: :development
|
165
149
|
prerelease: false
|
166
150
|
version_requirements: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
151
|
requirements:
|
169
|
-
- -
|
152
|
+
- - '>='
|
170
153
|
- !ruby/object:Gem::Version
|
171
154
|
version: 1.0.0
|
172
155
|
- !ruby/object:Gem::Dependency
|
173
156
|
name: timecop
|
174
157
|
requirement: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
158
|
requirements:
|
177
|
-
- -
|
159
|
+
- - '>='
|
178
160
|
- !ruby/object:Gem::Version
|
179
161
|
version: 0.3.0
|
180
162
|
type: :development
|
181
163
|
prerelease: false
|
182
164
|
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
none: false
|
184
165
|
requirements:
|
185
|
-
- -
|
166
|
+
- - '>='
|
186
167
|
- !ruby/object:Gem::Version
|
187
168
|
version: 0.3.0
|
188
169
|
description: Fluentd is an event collector system. It is a generalized version of
|
@@ -290,30 +271,26 @@ files:
|
|
290
271
|
- test/scripts/exec_script.rb
|
291
272
|
homepage: http://fluentd.org/
|
292
273
|
licenses: []
|
274
|
+
metadata: {}
|
293
275
|
post_install_message:
|
294
276
|
rdoc_options: []
|
295
277
|
require_paths:
|
296
278
|
- lib
|
297
279
|
required_ruby_version: !ruby/object:Gem::Requirement
|
298
|
-
none: false
|
299
280
|
requirements:
|
300
|
-
- -
|
281
|
+
- - '>='
|
301
282
|
- !ruby/object:Gem::Version
|
302
283
|
version: 1.9.2
|
303
284
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
|
-
none: false
|
305
285
|
requirements:
|
306
|
-
- -
|
286
|
+
- - '>='
|
307
287
|
- !ruby/object:Gem::Version
|
308
288
|
version: '0'
|
309
|
-
segments:
|
310
|
-
- 0
|
311
|
-
hash: -602194787130919488
|
312
289
|
requirements: []
|
313
290
|
rubyforge_project:
|
314
|
-
rubygems_version:
|
291
|
+
rubygems_version: 2.0.3
|
315
292
|
signing_key:
|
316
|
-
specification_version:
|
293
|
+
specification_version: 4
|
317
294
|
summary: Fluentd event collector
|
318
295
|
test_files:
|
319
296
|
- test/config.rb
|