fluentd 1.5.2-x86-mingw32 → 1.6.0-x86-mingw32
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 +4 -4
- data/.github/ISSUE_TEMPLATE.md +15 -6
- data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/CHANGELOG.md +29 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +5 -0
- data/Rakefile +6 -1
- data/appveyor.yml +9 -10
- data/lib/fluent/command/fluentd.rb +4 -0
- data/lib/fluent/config/literal_parser.rb +2 -2
- data/lib/fluent/plugin/base.rb +1 -0
- data/lib/fluent/plugin/buffer.rb +22 -0
- data/lib/fluent/plugin/in_forward.rb +2 -2
- data/lib/fluent/plugin/in_monitor_agent.rb +90 -131
- data/lib/fluent/plugin/out_forward.rb +4 -0
- data/lib/fluent/plugin/output.rb +31 -1
- data/lib/fluent/plugin/parser_none.rb +1 -2
- data/lib/fluent/plugin_helper.rb +1 -0
- data/lib/fluent/plugin_helper/cert_option.rb +1 -1
- data/lib/fluent/plugin_helper/http_server.rb +75 -0
- data/lib/fluent/plugin_helper/http_server/app.rb +79 -0
- data/lib/fluent/plugin_helper/http_server/compat/server.rb +81 -0
- data/lib/fluent/plugin_helper/http_server/compat/webrick_handler.rb +58 -0
- data/lib/fluent/plugin_helper/http_server/methods.rb +35 -0
- data/lib/fluent/plugin_helper/http_server/request.rb +42 -0
- data/lib/fluent/plugin_helper/http_server/router.rb +54 -0
- data/lib/fluent/plugin_helper/http_server/server.rb +87 -0
- data/lib/fluent/plugin_helper/socket.rb +8 -2
- data/lib/fluent/supervisor.rb +5 -2
- data/lib/fluent/time.rb +13 -0
- data/lib/fluent/version.rb +1 -1
- data/test/command/test_fluentd.rb +36 -2
- data/test/helper.rb +1 -0
- data/test/helpers/fuzzy_assert.rb +89 -0
- data/test/plugin/test_buf_file.rb +1 -1
- data/test/plugin/test_in_http.rb +2 -5
- data/test/plugin/test_in_monitor_agent.rb +118 -17
- data/test/plugin/test_in_udp.rb +0 -2
- data/test/plugin/test_out_file.rb +15 -12
- data/test/plugin/test_out_forward.rb +18 -0
- data/test/plugin/test_out_secondary_file.rb +6 -4
- data/test/plugin/test_output_as_buffered.rb +4 -0
- data/test/plugin/test_output_as_buffered_retries.rb +0 -2
- data/test/plugin/test_output_as_buffered_secondary.rb +0 -3
- data/test/plugin_helper/data/cert/cert-key.pem +27 -0
- data/test/plugin_helper/data/cert/cert-with-no-newline.pem +19 -0
- data/test/plugin_helper/data/cert/cert.pem +19 -0
- data/test/plugin_helper/http_server/test_app.rb +65 -0
- data/test/plugin_helper/http_server/test_route.rb +32 -0
- data/test/plugin_helper/test_cert_option.rb +16 -0
- data/test/plugin_helper/test_http_server_helper.rb +203 -0
- data/test/plugin_helper/test_server.rb +1 -7
- data/test/test_event_time.rb +13 -0
- data/test/test_log.rb +8 -6
- data/test/test_supervisor.rb +3 -0
- metadata +28 -2
@@ -0,0 +1,65 @@
|
|
1
|
+
require_relative '../../helper'
|
2
|
+
require 'flexmock/test_unit'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'fluent/plugin_helper/http_server/app'
|
6
|
+
skip = false
|
7
|
+
rescue LoadError => _
|
8
|
+
skip = true
|
9
|
+
end
|
10
|
+
|
11
|
+
unless skip
|
12
|
+
class HtttpHelperAppTest < Test::Unit::TestCase
|
13
|
+
NULL_LOGGER = Logger.new(nil)
|
14
|
+
|
15
|
+
class DummyRounter
|
16
|
+
def initialize(table = {})
|
17
|
+
@table = table
|
18
|
+
end
|
19
|
+
|
20
|
+
def route!(method, path, _req)
|
21
|
+
r = @table.fetch(method).fetch(path)
|
22
|
+
[200, {}, r]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
sub_test_case '#call' do
|
27
|
+
data(
|
28
|
+
'GET request' => 'GET',
|
29
|
+
'POST request' => 'POST',
|
30
|
+
'DELETE request' => 'DELETE',
|
31
|
+
'PUT request' => 'PUT',
|
32
|
+
'PATCH request' => 'PATCH',
|
33
|
+
'OPTION request' => 'OPTIONS',
|
34
|
+
'CONNECT request' => 'CONNECT',
|
35
|
+
'TRACE request' => 'TRACE',
|
36
|
+
)
|
37
|
+
test 'dispatch correct path' do |method|
|
38
|
+
r = DummyRounter.new(method.downcase.to_sym => { '/path/' => 'hi' })
|
39
|
+
app = Fluent::PluginHelper::HttpServer::App.new(r, NULL_LOGGER)
|
40
|
+
m = flexmock('request', method: method, path: '/path/')
|
41
|
+
r = app.call(m)
|
42
|
+
assert_equal(r.body.read, 'hi')
|
43
|
+
assert_equal(r.status, 200)
|
44
|
+
end
|
45
|
+
|
46
|
+
test 'dispatch correct path for head' do |method|
|
47
|
+
r = DummyRounter.new(head: { '/path/' => 'hi' })
|
48
|
+
app = Fluent::PluginHelper::HttpServer::App.new(r, NULL_LOGGER)
|
49
|
+
m = flexmock('request', method: method, path: '/path')
|
50
|
+
r = app.call(m)
|
51
|
+
assert_equal(r.body.read, '')
|
52
|
+
assert_equal(r.status, 200)
|
53
|
+
end
|
54
|
+
|
55
|
+
test 'if path does not end with `/`' do |method|
|
56
|
+
r = DummyRounter.new(head: { '/path/' => 'hi' })
|
57
|
+
app = Fluent::PluginHelper::HttpServer::App.new(r, NULL_LOGGER)
|
58
|
+
m = flexmock('request', method: method, path: '/path')
|
59
|
+
r = app.call(m)
|
60
|
+
assert_equal(r.body.read, '')
|
61
|
+
assert_equal(r.status, 200)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative '../../helper'
|
2
|
+
require 'flexmock/test_unit'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'fluent/plugin_helper/http_server/router'
|
6
|
+
skip = false
|
7
|
+
rescue LoadError => _
|
8
|
+
skip = true
|
9
|
+
end
|
10
|
+
|
11
|
+
unless skip
|
12
|
+
class HtttpHelperRouterTest < Test::Unit::TestCase
|
13
|
+
sub_test_case '#mount' do
|
14
|
+
test 'mount with method and path' do
|
15
|
+
router = Fluent::PluginHelper::HttpServer::Router.new
|
16
|
+
router.mount(:get, '/path/', ->(req) { req })
|
17
|
+
assert_equal(router.route!(:get, '/path/', 'request'), 'request')
|
18
|
+
end
|
19
|
+
|
20
|
+
test 'use default app if path is not found' do
|
21
|
+
router = Fluent::PluginHelper::HttpServer::Router.new
|
22
|
+
req = flexmock('request', path: 'path/')
|
23
|
+
assert_equal(router.route!(:get, '/path/', req), [404, { 'Content-Type' => 'text/plain' }, "404 Not Found: #{req.path}\n"])
|
24
|
+
end
|
25
|
+
|
26
|
+
test 'default app is configurable' do
|
27
|
+
router = Fluent::PluginHelper::HttpServer::Router.new(->(req) { req })
|
28
|
+
assert_equal(router.route!(:get, '/path/', 'hello'), 'hello')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../helper'
|
2
|
+
require 'fluent/plugin_helper/cert_option'
|
3
|
+
|
4
|
+
class CertOptionPluginHelperTest < Test::Unit::TestCase
|
5
|
+
class Dummy < Fluent::Plugin::TestBase
|
6
|
+
helpers :cert_option
|
7
|
+
end
|
8
|
+
|
9
|
+
test 'can load PEM encoded certificate file' do
|
10
|
+
d = Dummy.new
|
11
|
+
certs = d.cert_option_certificates_from_file("test/plugin_helper/data/cert/cert.pem")
|
12
|
+
assert_equal(1, certs.length)
|
13
|
+
certs = d.cert_option_certificates_from_file("test/plugin_helper/data/cert/cert-with-no-newline.pem")
|
14
|
+
assert_equal(1, certs.length)
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
require_relative '../helper'
|
2
|
+
require 'flexmock/test_unit'
|
3
|
+
require 'fluent/plugin_helper/http_server'
|
4
|
+
require 'fluent/plugin/output'
|
5
|
+
require 'fluent/event'
|
6
|
+
require 'net/http'
|
7
|
+
require 'uri'
|
8
|
+
|
9
|
+
class HtttpHelperTest < Test::Unit::TestCase
|
10
|
+
PORT = unused_port
|
11
|
+
NULL_LOGGER = Logger.new(nil)
|
12
|
+
|
13
|
+
class Dummy < Fluent::Plugin::TestBase
|
14
|
+
helpers :http_server
|
15
|
+
end
|
16
|
+
|
17
|
+
def on_driver
|
18
|
+
Fluent::Test.setup
|
19
|
+
driver = Dummy.new
|
20
|
+
driver.start
|
21
|
+
driver.after_start
|
22
|
+
|
23
|
+
yield(driver)
|
24
|
+
ensure
|
25
|
+
unless driver.stopped?
|
26
|
+
driver.stop rescue nil
|
27
|
+
end
|
28
|
+
|
29
|
+
unless driver.before_shutdown?
|
30
|
+
driver.before_shutdown rescue nil
|
31
|
+
end
|
32
|
+
|
33
|
+
unless driver.shutdown?
|
34
|
+
driver.shutdown rescue nil
|
35
|
+
end
|
36
|
+
|
37
|
+
unless driver.after_shutdown?
|
38
|
+
driver.after_shutdown rescue nil
|
39
|
+
end
|
40
|
+
|
41
|
+
unless driver.closed?
|
42
|
+
driver.close rescue nil
|
43
|
+
end
|
44
|
+
|
45
|
+
unless driver.terminated?
|
46
|
+
driver.terminated rescue nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
%w[get head].each do |n|
|
51
|
+
define_method(n) do |uri, header = {}|
|
52
|
+
url = URI.parse(uri)
|
53
|
+
req = Net::HTTP.const_get(n.capitalize).new(url, header)
|
54
|
+
Net::HTTP.start(url.host, url.port) do |http|
|
55
|
+
http.request(req)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
%w[post put patch delete options trace].each do |n|
|
61
|
+
define_method(n) do |uri, body = '', header = {}|
|
62
|
+
url = URI.parse(uri)
|
63
|
+
req = Net::HTTP.const_get(n.capitalize).new(url, header)
|
64
|
+
req.body = body
|
65
|
+
Net::HTTP.start(url.host, url.port) do |http|
|
66
|
+
http.request(req)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
sub_test_case 'Create a HTTP server' do
|
72
|
+
test 'monunt given path' do
|
73
|
+
on_driver do |driver|
|
74
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
|
75
|
+
s.get('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
|
76
|
+
s.post('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello post'] }
|
77
|
+
s.head('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello head'] }
|
78
|
+
s.put('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello put'] }
|
79
|
+
s.patch('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello patch'] }
|
80
|
+
s.delete('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello delete'] }
|
81
|
+
s.trace('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello trace'] }
|
82
|
+
s.options('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello options'] }
|
83
|
+
end
|
84
|
+
|
85
|
+
resp = head("http://127.0.0.1:#{PORT}/example/hello")
|
86
|
+
assert_equal('200', resp.code)
|
87
|
+
assert_equal(nil, resp.body)
|
88
|
+
assert_equal('text/plain', resp['Content-Type'])
|
89
|
+
|
90
|
+
%w[get put post put delete trace].each do |n|
|
91
|
+
resp = send(n, "http://127.0.0.1:#{PORT}/example/hello")
|
92
|
+
assert_equal('200', resp.code)
|
93
|
+
assert_equal("hello #{n}", resp.body)
|
94
|
+
assert_equal('text/plain', resp['Content-Type'])
|
95
|
+
end
|
96
|
+
|
97
|
+
# TODO: remove when fluentd drop ruby 2.1
|
98
|
+
if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create('2.2.0')
|
99
|
+
resp = options("http://127.0.0.1:#{PORT}/example/hello")
|
100
|
+
assert_equal('200', resp.code)
|
101
|
+
assert_equal("hello options", resp.body)
|
102
|
+
assert_equal('text/plain', resp['Content-Type'])
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
test 'when path does not start with `/` or ends with `/`' do
|
108
|
+
on_driver do |driver|
|
109
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
|
110
|
+
s.get('example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
|
111
|
+
s.get('/example/hello2/') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
|
112
|
+
end
|
113
|
+
|
114
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello")
|
115
|
+
assert_equal('404', resp.code)
|
116
|
+
|
117
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello2")
|
118
|
+
assert_equal('200', resp.code)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
test 'when error raised' do
|
123
|
+
on_driver do |driver|
|
124
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
|
125
|
+
s.get('/example/hello') { raise 'error!' }
|
126
|
+
end
|
127
|
+
|
128
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello")
|
129
|
+
assert_equal('500', resp.code)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
test 'when path is not found' do
|
134
|
+
on_driver do |driver|
|
135
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
|
136
|
+
s.get('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
|
137
|
+
end
|
138
|
+
|
139
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello/not_found")
|
140
|
+
assert_equal('404', resp.code)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
test 'params and body' do
|
145
|
+
on_driver do |driver|
|
146
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
|
147
|
+
s.get('/example/hello') do |req|
|
148
|
+
assert_equal(req.query_string, nil)
|
149
|
+
assert_equal(req.body, nil)
|
150
|
+
[200, { 'Content-Type' => 'text/plain' }, 'hello get']
|
151
|
+
end
|
152
|
+
|
153
|
+
s.post('/example/hello') do |req|
|
154
|
+
assert_equal(req.query_string, nil)
|
155
|
+
assert_equal(req.body, 'this is body')
|
156
|
+
[200, { 'Content-Type' => 'text/plain' }, 'hello post']
|
157
|
+
end
|
158
|
+
|
159
|
+
s.get('/example/hello/params') do |req|
|
160
|
+
assert_equal(req.query_string, 'test=true')
|
161
|
+
assert_equal(req.body, nil)
|
162
|
+
[200, { 'Content-Type' => 'text/plain' }, 'hello get']
|
163
|
+
end
|
164
|
+
|
165
|
+
s.post('/example/hello/params') do |req|
|
166
|
+
assert_equal(req.query_string, 'test=true')
|
167
|
+
assert_equal(req.body, 'this is body')
|
168
|
+
[200, { 'Content-Type' => 'text/plain' }, 'hello post']
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello")
|
173
|
+
assert_equal('200', resp.code)
|
174
|
+
|
175
|
+
resp = post("http://127.0.0.1:#{PORT}/example/hello", 'this is body')
|
176
|
+
assert_equal('200', resp.code)
|
177
|
+
|
178
|
+
resp = get("http://127.0.0.1:#{PORT}/example/hello/params?test=true")
|
179
|
+
assert_equal('200', resp.code)
|
180
|
+
|
181
|
+
resp = post("http://127.0.0.1:#{PORT}/example/hello/params?test=true", 'this is body')
|
182
|
+
assert_equal('200', resp.code)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
test 'must be called #start and #stop' do
|
187
|
+
on_driver do |driver|
|
188
|
+
server = flexmock('Server') do |watcher|
|
189
|
+
watcher.should_receive(:start).once.and_return do |que|
|
190
|
+
que.push(:start)
|
191
|
+
end
|
192
|
+
watcher.should_receive(:stop).once
|
193
|
+
end
|
194
|
+
|
195
|
+
stub(Fluent::PluginHelper::HttpServer::Server).new(anything) { server }
|
196
|
+
driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do
|
197
|
+
# nothing
|
198
|
+
end
|
199
|
+
driver.stop
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -230,16 +230,10 @@ class ServerPluginHelperTest < Test::Unit::TestCase
|
|
230
230
|
data(
|
231
231
|
'server_create udp' => [:server_create, :udp],
|
232
232
|
)
|
233
|
-
test 'raise error if tcp/tls/unix options specified for udp' do |(m, proto)|
|
233
|
+
test 'raise error if tcp/tls/unix backlog options specified for udp' do |(m, proto)|
|
234
234
|
assert_raise(ArgumentError.new("BUG: backlog is available for tcp/tls")) do
|
235
235
|
@d.__send__(m, :myserver, PORT, proto: proto, backlog: 500){|x| x }
|
236
236
|
end
|
237
|
-
end
|
238
|
-
|
239
|
-
data(
|
240
|
-
'server_create udp' => [:server_create, :udp],
|
241
|
-
)
|
242
|
-
test 'raise error if tcp/tls/unix options specified for udp' do |(m, proto)|
|
243
237
|
assert_raise(ArgumentError.new("BUG: send_keepalive_packet is available for tcp")) do
|
244
238
|
@d.__send__(m, :myserver, PORT, proto: proto, send_keepalive_packet: true){|x| x }
|
245
239
|
end
|
data/test/test_event_time.rb
CHANGED
@@ -36,6 +36,19 @@ class EventTimeTest < Test::Unit::TestCase
|
|
36
36
|
assert_equal('100', "#{time}")
|
37
37
|
end
|
38
38
|
|
39
|
+
test '#to_time' do
|
40
|
+
time = Fluent::EventTime.new(@now.to_i, @now.nsec).to_time
|
41
|
+
assert_instance_of(Time, time)
|
42
|
+
assert_equal(@now.to_i, time.to_i)
|
43
|
+
begin
|
44
|
+
::Time.at(0, 0, :nanosecond)
|
45
|
+
assert_equal(@now.nsec, time.nsec)
|
46
|
+
rescue
|
47
|
+
# Time.at(@sec, @nsec / 1000.0) sometimes cause 1 diff error in nsec by 1000.0
|
48
|
+
assert_in_delta(@now.nsec, time.nsec, 1)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
39
52
|
test '#to_json' do
|
40
53
|
time = Fluent::EventTime.new(100)
|
41
54
|
assert_equal('100', time.to_json)
|
data/test/test_log.rb
CHANGED
@@ -12,7 +12,7 @@ class LogTest < Test::Unit::TestCase
|
|
12
12
|
FileUtils.rm_rf(TMP_DIR)
|
13
13
|
FileUtils.mkdir_p(TMP_DIR)
|
14
14
|
@log_device = Fluent::Test::DummyLogDevice.new
|
15
|
-
@timestamp = Time.parse("2016-04-21
|
15
|
+
@timestamp = Time.parse("2016-04-21 02:58:41 +0000")
|
16
16
|
@timestamp_str = @timestamp.strftime("%Y-%m-%d %H:%M:%S %z")
|
17
17
|
Timecop.freeze(@timestamp)
|
18
18
|
end
|
@@ -540,7 +540,7 @@ end
|
|
540
540
|
class PluginLoggerTest < Test::Unit::TestCase
|
541
541
|
def setup
|
542
542
|
@log_device = Fluent::Test::DummyLogDevice.new
|
543
|
-
@timestamp = Time.parse("2016-04-21
|
543
|
+
@timestamp = Time.parse("2016-04-21 02:58:41 +0000")
|
544
544
|
@timestamp_str = @timestamp.strftime("%Y-%m-%d %H:%M:%S %z")
|
545
545
|
Timecop.freeze(@timestamp)
|
546
546
|
dl_opts = {}
|
@@ -796,13 +796,15 @@ class PluginLoggerTest < Test::Unit::TestCase
|
|
796
796
|
end
|
797
797
|
|
798
798
|
data(
|
799
|
-
text: [:text, "2016-04-21
|
800
|
-
json: [:json, %Q({"time":"2016-04-21
|
799
|
+
text: [:text, "2016-04-21 02:58:41 +0000 [info]: yaaay\n"],
|
800
|
+
json: [:json, %Q({"time":"2016-04-21 02:58:41 +0000","level":"info","message":"yaaay"}\n)],
|
801
801
|
)
|
802
802
|
def test_format(data)
|
803
803
|
fmt, expected_log_line = data
|
804
|
-
|
805
|
-
|
804
|
+
with_timezone('utc') {
|
805
|
+
@log.format = fmt
|
806
|
+
@log.info "yaaay"
|
807
|
+
}
|
806
808
|
assert{ @log_device.logs.include? expected_log_line }
|
807
809
|
end
|
808
810
|
|
data/test/test_supervisor.rb
CHANGED
@@ -274,6 +274,7 @@ class SupervisorTest < ::Test::Unit::TestCase
|
|
274
274
|
params['log_path'] = 'test/tmp/supervisor/log'
|
275
275
|
params['suppress_repeated_stacktrace'] = true
|
276
276
|
params['log_level'] = Fluent::Log::LEVEL_INFO
|
277
|
+
params['conf_encoding'] = 'utf-8'
|
277
278
|
load_config_proc = Proc.new { Fluent::Supervisor.load_config(tmp_dir, params) }
|
278
279
|
|
279
280
|
# first call
|
@@ -340,6 +341,7 @@ class SupervisorTest < ::Test::Unit::TestCase
|
|
340
341
|
params['suppress_repeated_stacktrace'] = true
|
341
342
|
params['log_level'] = Fluent::Log::LEVEL_INFO
|
342
343
|
params['daemonize'] = './fluentd.pid'
|
344
|
+
params['conf_encoding'] = 'utf-8'
|
343
345
|
load_config_proc = Proc.new { Fluent::Supervisor.load_config(tmp_dir, params) }
|
344
346
|
|
345
347
|
# first call
|
@@ -414,6 +416,7 @@ class SupervisorTest < ::Test::Unit::TestCase
|
|
414
416
|
params['log_path'] = 'test/tmp/supervisor/log'
|
415
417
|
params['suppress_repeated_stacktrace'] = true
|
416
418
|
params['log_level'] = Fluent::Log::LEVEL_INFO
|
419
|
+
params['conf_encoding'] = 'utf-8'
|
417
420
|
load_config_proc = Proc.new { Fluent::Supervisor.load_config(tmp_path, params) }
|
418
421
|
|
419
422
|
se_config = load_config_proc.call
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -385,6 +385,8 @@ extensions: []
|
|
385
385
|
extra_rdoc_files: []
|
386
386
|
files:
|
387
387
|
- ".github/ISSUE_TEMPLATE.md"
|
388
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
389
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
388
390
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
389
391
|
- ".gitignore"
|
390
392
|
- ".gitlab-ci.yml"
|
@@ -602,6 +604,14 @@ files:
|
|
602
604
|
- lib/fluent/plugin_helper/event_loop.rb
|
603
605
|
- lib/fluent/plugin_helper/extract.rb
|
604
606
|
- lib/fluent/plugin_helper/formatter.rb
|
607
|
+
- lib/fluent/plugin_helper/http_server.rb
|
608
|
+
- lib/fluent/plugin_helper/http_server/app.rb
|
609
|
+
- lib/fluent/plugin_helper/http_server/compat/server.rb
|
610
|
+
- lib/fluent/plugin_helper/http_server/compat/webrick_handler.rb
|
611
|
+
- lib/fluent/plugin_helper/http_server/methods.rb
|
612
|
+
- lib/fluent/plugin_helper/http_server/request.rb
|
613
|
+
- lib/fluent/plugin_helper/http_server/router.rb
|
614
|
+
- lib/fluent/plugin_helper/http_server/server.rb
|
605
615
|
- lib/fluent/plugin_helper/inject.rb
|
606
616
|
- lib/fluent/plugin_helper/parser.rb
|
607
617
|
- lib/fluent/plugin_helper/record_accessor.rb
|
@@ -688,6 +698,7 @@ files:
|
|
688
698
|
- test/counter/test_store.rb
|
689
699
|
- test/counter/test_validator.rb
|
690
700
|
- test/helper.rb
|
701
|
+
- test/helpers/fuzzy_assert.rb
|
691
702
|
- test/plugin/data/2010/01/20100102-030405.log
|
692
703
|
- test/plugin/data/2010/01/20100102-030406.log
|
693
704
|
- test/plugin/data/2010/01/20100102.log
|
@@ -770,12 +781,19 @@ files:
|
|
770
781
|
- test/plugin/test_storage.rb
|
771
782
|
- test/plugin/test_storage_local.rb
|
772
783
|
- test/plugin/test_string_util.rb
|
784
|
+
- test/plugin_helper/data/cert/cert-key.pem
|
785
|
+
- test/plugin_helper/data/cert/cert-with-no-newline.pem
|
786
|
+
- test/plugin_helper/data/cert/cert.pem
|
787
|
+
- test/plugin_helper/http_server/test_app.rb
|
788
|
+
- test/plugin_helper/http_server/test_route.rb
|
789
|
+
- test/plugin_helper/test_cert_option.rb
|
773
790
|
- test/plugin_helper/test_child_process.rb
|
774
791
|
- test/plugin_helper/test_compat_parameters.rb
|
775
792
|
- test/plugin_helper/test_event_emitter.rb
|
776
793
|
- test/plugin_helper/test_event_loop.rb
|
777
794
|
- test/plugin_helper/test_extract.rb
|
778
795
|
- test/plugin_helper/test_formatter.rb
|
796
|
+
- test/plugin_helper/test_http_server_helper.rb
|
779
797
|
- test/plugin_helper/test_inject.rb
|
780
798
|
- test/plugin_helper/test_parser.rb
|
781
799
|
- test/plugin_helper/test_record_accessor.rb
|
@@ -864,6 +882,7 @@ test_files:
|
|
864
882
|
- test/counter/test_store.rb
|
865
883
|
- test/counter/test_validator.rb
|
866
884
|
- test/helper.rb
|
885
|
+
- test/helpers/fuzzy_assert.rb
|
867
886
|
- test/plugin/data/2010/01/20100102-030405.log
|
868
887
|
- test/plugin/data/2010/01/20100102-030406.log
|
869
888
|
- test/plugin/data/2010/01/20100102.log
|
@@ -946,12 +965,19 @@ test_files:
|
|
946
965
|
- test/plugin/test_storage.rb
|
947
966
|
- test/plugin/test_storage_local.rb
|
948
967
|
- test/plugin/test_string_util.rb
|
968
|
+
- test/plugin_helper/data/cert/cert-key.pem
|
969
|
+
- test/plugin_helper/data/cert/cert-with-no-newline.pem
|
970
|
+
- test/plugin_helper/data/cert/cert.pem
|
971
|
+
- test/plugin_helper/http_server/test_app.rb
|
972
|
+
- test/plugin_helper/http_server/test_route.rb
|
973
|
+
- test/plugin_helper/test_cert_option.rb
|
949
974
|
- test/plugin_helper/test_child_process.rb
|
950
975
|
- test/plugin_helper/test_compat_parameters.rb
|
951
976
|
- test/plugin_helper/test_event_emitter.rb
|
952
977
|
- test/plugin_helper/test_event_loop.rb
|
953
978
|
- test/plugin_helper/test_extract.rb
|
954
979
|
- test/plugin_helper/test_formatter.rb
|
980
|
+
- test/plugin_helper/test_http_server_helper.rb
|
955
981
|
- test/plugin_helper/test_inject.rb
|
956
982
|
- test/plugin_helper/test_parser.rb
|
957
983
|
- test/plugin_helper/test_record_accessor.rb
|