fluentd 1.15.3 → 1.16.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/linux-test.yaml +2 -2
- data/.github/workflows/macos-test.yaml +2 -2
- data/.github/workflows/windows-test.yaml +2 -2
- data/CHANGELOG.md +77 -0
- data/MAINTAINERS.md +2 -0
- data/README.md +0 -1
- data/fluentd.gemspec +2 -2
- data/lib/fluent/command/fluentd.rb +55 -53
- data/lib/fluent/daemon.rb +2 -4
- data/lib/fluent/log/console_adapter.rb +66 -0
- data/lib/fluent/log.rb +35 -5
- data/lib/fluent/plugin/base.rb +5 -7
- data/lib/fluent/plugin/buf_file.rb +32 -3
- data/lib/fluent/plugin/buf_file_single.rb +32 -3
- data/lib/fluent/plugin/buffer/file_chunk.rb +1 -1
- data/lib/fluent/plugin/buffer.rb +21 -0
- data/lib/fluent/plugin/in_tcp.rb +4 -2
- data/lib/fluent/plugin/out_forward/ack_handler.rb +19 -4
- data/lib/fluent/plugin/out_forward.rb +2 -2
- data/lib/fluent/plugin/out_secondary_file.rb +39 -22
- data/lib/fluent/plugin/output.rb +49 -12
- data/lib/fluent/plugin_helper/http_server/server.rb +2 -1
- data/lib/fluent/supervisor.rb +157 -251
- data/lib/fluent/test/driver/base.rb +11 -5
- data/lib/fluent/test/driver/filter.rb +4 -0
- data/lib/fluent/test/startup_shutdown.rb +6 -8
- data/lib/fluent/version.rb +1 -1
- data/test/command/test_ctl.rb +1 -1
- data/test/command/test_fluentd.rb +137 -6
- data/test/command/test_plugin_config_formatter.rb +0 -1
- data/test/compat/test_parser.rb +5 -5
- data/test/config/test_system_config.rb +0 -8
- data/test/log/test_console_adapter.rb +110 -0
- data/test/plugin/out_forward/test_ack_handler.rb +39 -0
- data/test/plugin/test_base.rb +98 -0
- data/test/plugin/test_buf_file.rb +62 -23
- data/test/plugin/test_buf_file_single.rb +65 -0
- data/test/plugin/test_in_http.rb +2 -3
- data/test/plugin/test_in_monitor_agent.rb +2 -3
- data/test/plugin/test_in_tcp.rb +15 -0
- data/test/plugin/test_out_forward.rb +14 -18
- data/test/plugin/test_out_http.rb +1 -0
- data/test/plugin/test_output.rb +269 -0
- data/test/plugin/test_parser_regexp.rb +1 -6
- data/test/plugin_helper/test_http_server_helper.rb +1 -1
- data/test/plugin_helper/test_server.rb +10 -5
- data/test/test_config.rb +0 -21
- data/test/test_formatter.rb +23 -20
- data/test/test_log.rb +71 -36
- data/test/test_supervisor.rb +277 -282
- metadata +12 -19
- data/.drone.yml +0 -35
- data/.gitlab-ci.yml +0 -103
- data/test/test_logger_initializer.rb +0 -46
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.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sadayuki Furuhashi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -84,7 +84,7 @@ dependencies:
|
|
|
84
84
|
requirements:
|
|
85
85
|
- - ">="
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 2.3.
|
|
87
|
+
version: 2.3.2
|
|
88
88
|
- - "<"
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
90
|
version: 3.0.0
|
|
@@ -94,7 +94,7 @@ dependencies:
|
|
|
94
94
|
requirements:
|
|
95
95
|
- - ">="
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 2.3.
|
|
97
|
+
version: 2.3.2
|
|
98
98
|
- - "<"
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: 3.0.0
|
|
@@ -190,22 +190,16 @@ dependencies:
|
|
|
190
190
|
name: webrick
|
|
191
191
|
requirement: !ruby/object:Gem::Requirement
|
|
192
192
|
requirements:
|
|
193
|
-
- - "
|
|
194
|
-
- !ruby/object:Gem::Version
|
|
195
|
-
version: 1.4.2
|
|
196
|
-
- - "<"
|
|
193
|
+
- - "~>"
|
|
197
194
|
- !ruby/object:Gem::Version
|
|
198
|
-
version: 1.
|
|
195
|
+
version: '1.4'
|
|
199
196
|
type: :runtime
|
|
200
197
|
prerelease: false
|
|
201
198
|
version_requirements: !ruby/object:Gem::Requirement
|
|
202
199
|
requirements:
|
|
203
|
-
- - "
|
|
204
|
-
- !ruby/object:Gem::Version
|
|
205
|
-
version: 1.4.2
|
|
206
|
-
- - "<"
|
|
200
|
+
- - "~>"
|
|
207
201
|
- !ruby/object:Gem::Version
|
|
208
|
-
version: 1.
|
|
202
|
+
version: '1.4'
|
|
209
203
|
- !ruby/object:Gem::Dependency
|
|
210
204
|
name: rake
|
|
211
205
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -385,7 +379,6 @@ extensions: []
|
|
|
385
379
|
extra_rdoc_files: []
|
|
386
380
|
files:
|
|
387
381
|
- ".deepsource.toml"
|
|
388
|
-
- ".drone.yml"
|
|
389
382
|
- ".github/ISSUE_TEMPLATE.md"
|
|
390
383
|
- ".github/ISSUE_TEMPLATE/bug_report.yaml"
|
|
391
384
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
|
@@ -395,7 +388,6 @@ files:
|
|
|
395
388
|
- ".github/workflows/macos-test.yaml"
|
|
396
389
|
- ".github/workflows/windows-test.yaml"
|
|
397
390
|
- ".gitignore"
|
|
398
|
-
- ".gitlab-ci.yml"
|
|
399
391
|
- ADOPTERS.md
|
|
400
392
|
- AUTHORS
|
|
401
393
|
- CHANGELOG.md
|
|
@@ -535,6 +527,7 @@ files:
|
|
|
535
527
|
- lib/fluent/label.rb
|
|
536
528
|
- lib/fluent/load.rb
|
|
537
529
|
- lib/fluent/log.rb
|
|
530
|
+
- lib/fluent/log/console_adapter.rb
|
|
538
531
|
- lib/fluent/match.rb
|
|
539
532
|
- lib/fluent/mixin.rb
|
|
540
533
|
- lib/fluent/msgpack_factory.rb
|
|
@@ -756,6 +749,7 @@ files:
|
|
|
756
749
|
- test/helper.rb
|
|
757
750
|
- test/helpers/fuzzy_assert.rb
|
|
758
751
|
- test/helpers/process_extenstion.rb
|
|
752
|
+
- test/log/test_console_adapter.rb
|
|
759
753
|
- test/plugin/data/2010/01/20100102-030405.log
|
|
760
754
|
- test/plugin/data/2010/01/20100102-030406.log
|
|
761
755
|
- test/plugin/data/2010/01/20100102.log
|
|
@@ -925,7 +919,6 @@ files:
|
|
|
925
919
|
- test/test_formatter.rb
|
|
926
920
|
- test/test_input.rb
|
|
927
921
|
- test/test_log.rb
|
|
928
|
-
- test/test_logger_initializer.rb
|
|
929
922
|
- test/test_match.rb
|
|
930
923
|
- test/test_mixin.rb
|
|
931
924
|
- test/test_msgpack_factory.rb
|
|
@@ -964,7 +957,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
964
957
|
- !ruby/object:Gem::Version
|
|
965
958
|
version: '0'
|
|
966
959
|
requirements: []
|
|
967
|
-
rubygems_version: 3.3.
|
|
960
|
+
rubygems_version: 3.3.5
|
|
968
961
|
signing_key:
|
|
969
962
|
specification_version: 4
|
|
970
963
|
summary: Fluentd event collector
|
|
@@ -999,6 +992,7 @@ test_files:
|
|
|
999
992
|
- test/helper.rb
|
|
1000
993
|
- test/helpers/fuzzy_assert.rb
|
|
1001
994
|
- test/helpers/process_extenstion.rb
|
|
995
|
+
- test/log/test_console_adapter.rb
|
|
1002
996
|
- test/plugin/data/2010/01/20100102-030405.log
|
|
1003
997
|
- test/plugin/data/2010/01/20100102-030406.log
|
|
1004
998
|
- test/plugin/data/2010/01/20100102.log
|
|
@@ -1168,7 +1162,6 @@ test_files:
|
|
|
1168
1162
|
- test/test_formatter.rb
|
|
1169
1163
|
- test/test_input.rb
|
|
1170
1164
|
- test/test_log.rb
|
|
1171
|
-
- test/test_logger_initializer.rb
|
|
1172
1165
|
- test/test_match.rb
|
|
1173
1166
|
- test/test_mixin.rb
|
|
1174
1167
|
- test/test_msgpack_factory.rb
|
data/.drone.yml
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
kind: pipeline
|
|
2
|
-
name: fluentd-test-arm64-3-0
|
|
3
|
-
|
|
4
|
-
platform:
|
|
5
|
-
os: linux
|
|
6
|
-
arch: arm64
|
|
7
|
-
|
|
8
|
-
steps:
|
|
9
|
-
- name: fluentd-test-arm64-3-0
|
|
10
|
-
image: arm64v8/ruby:3.0
|
|
11
|
-
commands:
|
|
12
|
-
- apt update
|
|
13
|
-
- apt -y install libgmp3-dev
|
|
14
|
-
- export BUNDLE_GEMFILE=$PWD/Gemfile
|
|
15
|
-
- gem update --system
|
|
16
|
-
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
17
|
-
- bundle exec rake test
|
|
18
|
-
---
|
|
19
|
-
kind: pipeline
|
|
20
|
-
name: fluentd-test-arm64-2-7
|
|
21
|
-
|
|
22
|
-
platform:
|
|
23
|
-
os: linux
|
|
24
|
-
arch: arm64
|
|
25
|
-
|
|
26
|
-
steps:
|
|
27
|
-
- name: fluentd-test-arm64-2-7
|
|
28
|
-
image: arm64v8/ruby:2.7
|
|
29
|
-
commands:
|
|
30
|
-
- apt update
|
|
31
|
-
- apt -y install libgmp3-dev
|
|
32
|
-
- export BUNDLE_GEMFILE=$PWD/Gemfile
|
|
33
|
-
- gem update --system
|
|
34
|
-
- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
35
|
-
- bundle exec rake test
|
data/.gitlab-ci.yml
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
.install-template:
|
|
2
|
-
before_script:
|
|
3
|
-
- gem update --system
|
|
4
|
-
- ruby -v
|
|
5
|
-
|
|
6
|
-
.test-template:
|
|
7
|
-
before_script:
|
|
8
|
-
- gem install rake
|
|
9
|
-
- bundle install
|
|
10
|
-
- chmod 777 -R ./test
|
|
11
|
-
|
|
12
|
-
stages:
|
|
13
|
-
- build
|
|
14
|
-
- tests
|
|
15
|
-
|
|
16
|
-
2-6-6:
|
|
17
|
-
image: "ruby:2.6.6"
|
|
18
|
-
stage: build
|
|
19
|
-
extends: .install-template
|
|
20
|
-
script:
|
|
21
|
-
- bundle install --jobs=3 --retry=3
|
|
22
|
-
cache:
|
|
23
|
-
key: "$CI_COMMIT_REF_SLUG 2-6-6"
|
|
24
|
-
paths:
|
|
25
|
-
|
|
26
|
-
2-7-2:
|
|
27
|
-
image: "ruby:2.7.2"
|
|
28
|
-
stage: build
|
|
29
|
-
extends: .install-template
|
|
30
|
-
script:
|
|
31
|
-
- bundle install --jobs=3 --retry=3
|
|
32
|
-
cache:
|
|
33
|
-
key: "$CI_COMMIT_REF_SLUG 2-7-2"
|
|
34
|
-
paths:
|
|
35
|
-
|
|
36
|
-
3-0-0:
|
|
37
|
-
image: "ruby:3.0.0"
|
|
38
|
-
stage: build
|
|
39
|
-
extends: .install-template
|
|
40
|
-
script:
|
|
41
|
-
- bundle install --jobs=3 --retry=3
|
|
42
|
-
cache:
|
|
43
|
-
key: "$CI_COMMIT_REF_SLUG 3-0-0"
|
|
44
|
-
paths:
|
|
45
|
-
|
|
46
|
-
rubyhead:
|
|
47
|
-
image: "ruby:latest"
|
|
48
|
-
stage: build
|
|
49
|
-
extends: .install-template
|
|
50
|
-
script:
|
|
51
|
-
- bundle install --jobs=3 --retry=3
|
|
52
|
-
cache:
|
|
53
|
-
key: "$CI_COMMIT_REF_SLUG latest"
|
|
54
|
-
paths:
|
|
55
|
-
- ./*
|
|
56
|
-
|
|
57
|
-
2-6-6-test:
|
|
58
|
-
image: "ruby:2.6.6"
|
|
59
|
-
stage: tests
|
|
60
|
-
allow_failure: true
|
|
61
|
-
extends: .test-template
|
|
62
|
-
script:
|
|
63
|
-
- bundle exec rake test
|
|
64
|
-
cache:
|
|
65
|
-
key: "$CI_COMMIT_REF_SLUG 2-6-6"
|
|
66
|
-
paths:
|
|
67
|
-
- ./*
|
|
68
|
-
|
|
69
|
-
2-7-2-test:
|
|
70
|
-
image: "ruby:2.7.2"
|
|
71
|
-
stage: tests
|
|
72
|
-
allow_failure: true
|
|
73
|
-
extends: .test-template
|
|
74
|
-
script:
|
|
75
|
-
- bundle exec rake test
|
|
76
|
-
cache:
|
|
77
|
-
key: "$CI_COMMIT_REF_SLUG 2-7-2"
|
|
78
|
-
paths:
|
|
79
|
-
- ./*
|
|
80
|
-
|
|
81
|
-
3-0-0-test:
|
|
82
|
-
image: "ruby:3.0.0"
|
|
83
|
-
stage: tests
|
|
84
|
-
allow_failure: true
|
|
85
|
-
extends: .test-template
|
|
86
|
-
script:
|
|
87
|
-
- bundle exec rake test
|
|
88
|
-
cache:
|
|
89
|
-
key: "$CI_COMMIT_REF_SLUG 3-0-0"
|
|
90
|
-
paths:
|
|
91
|
-
- ./*
|
|
92
|
-
|
|
93
|
-
rubyhead-test:
|
|
94
|
-
image: "ruby:latest"
|
|
95
|
-
stage: tests
|
|
96
|
-
allow_failure: true
|
|
97
|
-
extends: .test-template
|
|
98
|
-
script:
|
|
99
|
-
- bundle exec rake test
|
|
100
|
-
cache:
|
|
101
|
-
key: "$CI_COMMIT_REF_SLUG latest"
|
|
102
|
-
paths:
|
|
103
|
-
- ./*
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
require_relative 'helper'
|
|
2
|
-
require 'fluent/supervisor'
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
|
|
5
|
-
class LoggerInitializerTest < ::Test::Unit::TestCase
|
|
6
|
-
TMP_DIR = File.expand_path(File.dirname(__FILE__) + "/tmp/logger_initializer#{ENV['TEST_ENV_NUMBER']}")
|
|
7
|
-
|
|
8
|
-
teardown do
|
|
9
|
-
begin
|
|
10
|
-
FileUtils.rm_rf(TMP_DIR)
|
|
11
|
-
rescue => _
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
test 'when path is given' do
|
|
16
|
-
path = File.join(TMP_DIR, 'fluent_with_path.log')
|
|
17
|
-
|
|
18
|
-
assert_false File.exist?(TMP_DIR)
|
|
19
|
-
logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
|
|
20
|
-
mock.proxy(File).chmod(0o777, TMP_DIR).never
|
|
21
|
-
|
|
22
|
-
assert_nothing_raised do
|
|
23
|
-
logger.init(:supervisor, 0)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
assert_true File.exist?(TMP_DIR)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
test 'apply_options with log_dir_perm' do
|
|
30
|
-
omit "NTFS doesn't support UNIX like permissions" if Fluent.windows?
|
|
31
|
-
|
|
32
|
-
path = File.join(TMP_DIR, 'fluent_with_path.log')
|
|
33
|
-
|
|
34
|
-
assert_false File.exist?(TMP_DIR)
|
|
35
|
-
logger = Fluent::Supervisor::LoggerInitializer.new(path, Fluent::Log::LEVEL_DEBUG, nil, nil, {})
|
|
36
|
-
mock.proxy(File).chmod(0o777, TMP_DIR).once
|
|
37
|
-
|
|
38
|
-
assert_nothing_raised do
|
|
39
|
-
logger.init(:supervisor, 0)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
logger.apply_options(log_dir_perm: 0o777)
|
|
43
|
-
assert_true File.exist?(TMP_DIR)
|
|
44
|
-
assert_equal 0o777, (File.stat(TMP_DIR).mode & 0xFFF)
|
|
45
|
-
end
|
|
46
|
-
end
|