fluentd 0.14.23 → 0.14.24
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/CHANGELOG.md +14 -0
- data/lib/fluent/command/cat.rb +1 -1
- data/lib/fluent/command/debug.rb +1 -1
- data/lib/fluent/command/fluentd.rb +1 -1
- data/lib/fluent/command/plugin_config_formatter.rb +22 -2
- data/lib/fluent/plugin/in_syslog.rb +1 -1
- data/lib/fluent/plugin/in_unix.rb +1 -1
- data/lib/fluent/plugin/output.rb +3 -3
- data/lib/fluent/plugin_helper/record_accessor.rb +1 -1
- data/lib/fluent/plugin_helper/server.rb +14 -5
- data/lib/fluent/supervisor.rb +1 -1
- data/lib/fluent/version.rb +1 -1
- data/test/command/test_plugin_config_formatter.rb +6 -6
- 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: 3b8e3c3ad160e7b55045cc90693e4ed49e32e4d2
|
4
|
+
data.tar.gz: 0e0d26c585d8f9bd617050ce04936dc8a2d38095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a1790cd33c2c41176dd0452d918b979d21a5e7ac32f7730ad91d9b8c62404c095303d90f39bf69ea11dfac193bf733613e6926fc1aa7a73d8f6941f71c94bdb
|
7
|
+
data.tar.gz: 254bedd1088b57682cdbe0df7f547cad567702b6872d334c6cc82eb9d95c85f95a6c7537850bc0668a653ce73e4d69093861c482c45f459e9e49490a657521d7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# v0.14
|
2
2
|
|
3
|
+
## Release v0.14.24 - 2017/11/24
|
4
|
+
|
5
|
+
### New features / Enhancements
|
6
|
+
|
7
|
+
* plugin-config-formatter: Add link to plugin helper result
|
8
|
+
https://github.com/fluent/fluentd/pull/1753
|
9
|
+
* server helper: Refactor code
|
10
|
+
https://github.com/fluent/fluentd/pull/1759
|
11
|
+
|
12
|
+
### Bug fixes
|
13
|
+
|
14
|
+
* supervisor: Don't call change_privilege twice
|
15
|
+
https://github.com/fluent/fluentd/pull/1757
|
16
|
+
|
3
17
|
## Release v0.14.23 - 2017/11/15
|
4
18
|
|
5
19
|
### New features / Enhancements
|
data/lib/fluent/command/cat.rb
CHANGED
@@ -73,7 +73,7 @@ op.on('--time-as-integer', "Send time as integer for v0.12 or earlier", TrueClas
|
|
73
73
|
time_as_integer = true
|
74
74
|
}
|
75
75
|
|
76
|
-
|
76
|
+
singleton_class.module_eval do
|
77
77
|
define_method(:usage) do |msg|
|
78
78
|
puts op.to_s
|
79
79
|
puts "error: #{msg}" if msg
|
data/lib/fluent/command/debug.rb
CHANGED
@@ -31,6 +31,8 @@ class FluentPluginConfigFormatter
|
|
31
31
|
"buffer", "parser", "formatter", "storage"
|
32
32
|
]
|
33
33
|
|
34
|
+
DOCS_BASE_URL = "https://docs.fluentd.org/v0.14/articles/"
|
35
|
+
|
34
36
|
def initialize(argv = ARGV)
|
35
37
|
@argv = argv
|
36
38
|
|
@@ -134,7 +136,7 @@ class FluentPluginConfigFormatter
|
|
134
136
|
if plugin_helpers && !plugin_helpers.empty?
|
135
137
|
dumped = "## Plugin helpers\n\n"
|
136
138
|
plugin_helpers.each do |plugin_helper|
|
137
|
-
dumped << "* #{plugin_helper}\n"
|
139
|
+
dumped << "* #{plugin_helper_markdown_link(plugin_helper)}\n"
|
138
140
|
end
|
139
141
|
dumped << "\n"
|
140
142
|
end
|
@@ -143,7 +145,7 @@ class FluentPluginConfigFormatter
|
|
143
145
|
dumped << "## #{name}\n\n"
|
144
146
|
dumped << dump_section_markdown(config)
|
145
147
|
else
|
146
|
-
dumped << "* See also: #{name}\n\n"
|
148
|
+
dumped << "* See also: #{plugin_overview_markdown_link(name)}\n\n"
|
147
149
|
end
|
148
150
|
end
|
149
151
|
dumped
|
@@ -181,6 +183,24 @@ class FluentPluginConfigFormatter
|
|
181
183
|
end
|
182
184
|
end
|
183
185
|
|
186
|
+
def plugin_helper_url(plugin_helper)
|
187
|
+
"#{DOCS_BASE_URL}api-plugin-helper-#{plugin_helper}"
|
188
|
+
end
|
189
|
+
|
190
|
+
def plugin_helper_markdown_link(plugin_helper)
|
191
|
+
"[#{plugin_helper}](#{plugin_helper_url(plugin_helper)})"
|
192
|
+
end
|
193
|
+
|
194
|
+
def plugin_overview_url(class_name)
|
195
|
+
plugin_type = class_name.slice(/::(\w+)\z/, 1).downcase
|
196
|
+
"#{DOCS_BASE_URL}#{plugin_type}-plugin-overview"
|
197
|
+
end
|
198
|
+
|
199
|
+
def plugin_overview_markdown_link(class_name)
|
200
|
+
plugin_type = class_name.slice(/::(\w+)\z/, 1)
|
201
|
+
"[#{plugin_type} Plugin Overview](#{plugin_overview_url(class_name)})"
|
202
|
+
end
|
203
|
+
|
184
204
|
def usage(message = nil)
|
185
205
|
puts @parser.to_s
|
186
206
|
puts
|
@@ -156,8 +156,8 @@ module Fluent::Plugin
|
|
156
156
|
delimiter = "\n"
|
157
157
|
delimiter_size = delimiter.size
|
158
158
|
server_create_connection(:in_syslog_tcp_server, @port, bind: @bind, resolve_name: @resolve_hostname) do |conn|
|
159
|
-
buffer = ""
|
160
159
|
conn.data do |data|
|
160
|
+
buffer = conn.buffer
|
161
161
|
buffer << data
|
162
162
|
pos = 0
|
163
163
|
while idx = buffer.index(delimiter, pos)
|
data/lib/fluent/plugin/output.rb
CHANGED
@@ -224,7 +224,7 @@ module Fluent
|
|
224
224
|
end
|
225
225
|
self.context_router = primary.context_router
|
226
226
|
|
227
|
-
|
227
|
+
singleton_class.module_eval do
|
228
228
|
define_method(:commit_write){ |chunk_id| @primary_instance.commit_write(chunk_id, delayed: delayed_commit, secondary: true) }
|
229
229
|
define_method(:rollback_write){ |chunk_id| @primary_instance.rollback_write(chunk_id) }
|
230
230
|
end
|
@@ -389,7 +389,7 @@ module Fluent
|
|
389
389
|
|
390
390
|
if @buffering
|
391
391
|
m = method(:emit_buffered)
|
392
|
-
|
392
|
+
singleton_class.module_eval do
|
393
393
|
define_method(:emit_events, m)
|
394
394
|
end
|
395
395
|
|
@@ -403,7 +403,7 @@ module Fluent
|
|
403
403
|
@delayed_commit_timeout = @buffer_config.delayed_commit_timeout
|
404
404
|
else # !@buffering
|
405
405
|
m = method(:emit_sync)
|
406
|
-
|
406
|
+
singleton_class.module_eval do
|
407
407
|
define_method(:emit_events, m)
|
408
408
|
end
|
409
409
|
end
|
@@ -370,6 +370,9 @@ module Fluent
|
|
370
370
|
sock
|
371
371
|
end
|
372
372
|
|
373
|
+
# Use string "?" for port, not integer or nil. "?" is clear than -1 or nil in the log.
|
374
|
+
PEERADDR_FAILED = ["?", "?", "name resolusion failed", "?"]
|
375
|
+
|
373
376
|
class CallbackSocket
|
374
377
|
def initialize(server_type, sock, enabled_events = [], close_socket: true)
|
375
378
|
@server_type = server_type
|
@@ -425,11 +428,13 @@ module Fluent
|
|
425
428
|
end
|
426
429
|
|
427
430
|
class TCPCallbackSocket < CallbackSocket
|
431
|
+
ENABLED_EVENTS = [:data, :write_complete, :close]
|
432
|
+
|
428
433
|
attr_accessor :buffer
|
429
434
|
|
430
435
|
def initialize(sock)
|
431
|
-
super("tcp", sock,
|
432
|
-
@peeraddr = @sock.peeraddr
|
436
|
+
super("tcp", sock, ENABLED_EVENTS)
|
437
|
+
@peeraddr = (@sock.peeraddr rescue PEERADDR_FAILED)
|
433
438
|
@buffer = ''
|
434
439
|
end
|
435
440
|
|
@@ -439,9 +444,11 @@ module Fluent
|
|
439
444
|
end
|
440
445
|
|
441
446
|
class TLSCallbackSocket < CallbackSocket
|
447
|
+
ENABLED_EVENTS = [:data, :write_complete, :close]
|
448
|
+
|
442
449
|
def initialize(sock)
|
443
|
-
super("tls", sock,
|
444
|
-
@peeraddr = @sock.to_io.peeraddr
|
450
|
+
super("tls", sock, ENABLED_EVENTS)
|
451
|
+
@peeraddr = (@sock.to_io.peeraddr rescue PEERADDR_FAILED)
|
445
452
|
end
|
446
453
|
|
447
454
|
def write(data)
|
@@ -450,8 +457,10 @@ module Fluent
|
|
450
457
|
end
|
451
458
|
|
452
459
|
class UDPCallbackSocket < CallbackSocket
|
460
|
+
ENABLED_EVENTS = []
|
461
|
+
|
453
462
|
def initialize(sock, peeraddr, **kwargs)
|
454
|
-
super("udp", sock,
|
463
|
+
super("udp", sock, ENABLED_EVENTS, **kwargs)
|
455
464
|
@peeraddr = peeraddr
|
456
465
|
end
|
457
466
|
|
data/lib/fluent/supervisor.rb
CHANGED
data/lib/fluent/version.rb
CHANGED
@@ -179,10 +179,10 @@ TEXT
|
|
179
179
|
expected = <<TEXT
|
180
180
|
## Plugin helpers
|
181
181
|
|
182
|
-
* inject
|
183
|
-
* compat_parameters
|
182
|
+
* [inject](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-inject)
|
183
|
+
* [compat_parameters](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-compat_parameters)
|
184
184
|
|
185
|
-
* See also:
|
185
|
+
* See also: [Input Plugin Overview](https://docs.fluentd.org/v0.14/articles/input-plugin-overview)
|
186
186
|
|
187
187
|
## TestFluentPluginConfigFormatter::SimpleInput
|
188
188
|
|
@@ -202,10 +202,10 @@ TEXT
|
|
202
202
|
expected = <<TEXT
|
203
203
|
## Plugin helpers
|
204
204
|
|
205
|
-
* inject
|
206
|
-
* compat_parameters
|
205
|
+
* [inject](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-inject)
|
206
|
+
* [compat_parameters](https://docs.fluentd.org/v0.14/articles/api-plugin-helper-compat_parameters)
|
207
207
|
|
208
|
-
* See also:
|
208
|
+
* See also: [Output Plugin Overview](https://docs.fluentd.org/v0.14/articles/output-plugin-overview)
|
209
209
|
|
210
210
|
## TestFluentPluginConfigFormatter::ComplexOutput
|
211
211
|
|
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: 0.14.
|
4
|
+
version: 0.14.24
|
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-11-
|
11
|
+
date: 2017-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|