fluentd 1.10.1 → 1.11.1
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.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +112 -1
- data/CONTRIBUTING.md +1 -1
- data/lib/fluent/command/debug.rb +1 -0
- data/lib/fluent/command/fluentd.rb +12 -1
- data/lib/fluent/config.rb +1 -0
- data/lib/fluent/log.rb +45 -6
- data/lib/fluent/match.rb +1 -1
- data/lib/fluent/plugin/in_dummy.rb +2 -2
- data/lib/fluent/plugin/in_forward.rb +2 -2
- data/lib/fluent/plugin/in_gc_stat.rb +16 -0
- data/lib/fluent/plugin/in_http.rb +146 -75
- data/lib/fluent/plugin/in_monitor_agent.rb +1 -1
- data/lib/fluent/plugin/in_syslog.rb +4 -4
- data/lib/fluent/plugin/in_tail.rb +4 -4
- data/lib/fluent/plugin/in_unix.rb +77 -77
- data/lib/fluent/plugin/out_copy.rb +1 -1
- data/lib/fluent/plugin/out_file.rb +1 -1
- data/lib/fluent/plugin/out_forward.rb +23 -18
- data/lib/fluent/plugin/out_forward/load_balancer.rb +1 -1
- data/lib/fluent/plugin/out_http.rb +15 -2
- data/lib/fluent/plugin/parser_multiline.rb +1 -1
- data/lib/fluent/plugin/parser_syslog.rb +215 -54
- data/lib/fluent/plugin_helper/child_process.rb +3 -2
- data/lib/fluent/plugin_helper/record_accessor.rb +14 -0
- data/lib/fluent/plugin_helper/service_discovery.rb +7 -0
- data/lib/fluent/plugin_helper/service_discovery/manager.rb +8 -0
- data/lib/fluent/plugin_helper/socket.rb +20 -2
- data/lib/fluent/plugin_helper/socket_option.rb +2 -2
- data/lib/fluent/supervisor.rb +21 -9
- data/lib/fluent/system_config.rb +2 -1
- data/lib/fluent/test/filter_test.rb +2 -2
- data/lib/fluent/test/output_test.rb +3 -3
- data/lib/fluent/version.rb +1 -1
- data/test/command/test_fluentd.rb +57 -10
- data/test/config/test_system_config.rb +2 -0
- data/test/plugin/out_forward/test_load_balancer.rb +46 -0
- data/test/plugin/test_in_gc_stat.rb +24 -1
- data/test/plugin/test_in_http.rb +57 -0
- data/test/plugin/test_in_syslog.rb +1 -1
- data/test/plugin/test_in_tail.rb +20 -16
- data/test/plugin/test_in_unix.rb +128 -73
- data/test/plugin/test_out_forward.rb +11 -2
- data/test/plugin/test_out_http.rb +38 -0
- data/test/plugin/test_out_null.rb +1 -1
- data/test/plugin/test_output_as_buffered_retries.rb +12 -4
- data/test/plugin/test_parser_syslog.rb +66 -29
- data/test/plugin_helper/data/cert/cert_chains/ca-cert-key.pem +27 -0
- data/test/plugin_helper/data/cert/cert_chains/ca-cert.pem +20 -0
- data/test/plugin_helper/data/cert/cert_chains/cert-key.pem +27 -0
- data/test/plugin_helper/data/cert/cert_chains/cert.pem +40 -0
- data/test/plugin_helper/data/cert/generate_cert.rb +38 -0
- data/test/plugin_helper/http_server/test_app.rb +1 -1
- data/test/plugin_helper/http_server/test_route.rb +1 -1
- data/test/plugin_helper/test_child_process.rb +15 -0
- data/test/plugin_helper/test_http_server_helper.rb +2 -2
- data/test/plugin_helper/test_record_accessor.rb +41 -0
- data/test/plugin_helper/test_server.rb +1 -1
- data/test/plugin_helper/test_service_discovery.rb +37 -4
- data/test/plugin_helper/test_socket.rb +131 -0
- data/test/test_log.rb +44 -0
- metadata +12 -2
data/test/test_log.rb
CHANGED
@@ -367,6 +367,50 @@ class LogTest < Test::Unit::TestCase
|
|
367
367
|
end
|
368
368
|
end
|
369
369
|
|
370
|
+
sub_test_case "ignore_repeated_log_interval" do
|
371
|
+
def test_same_message
|
372
|
+
message = "This is test"
|
373
|
+
logger = ServerEngine::DaemonLogger.new(@log_device, {log_level: ServerEngine::DaemonLogger::INFO})
|
374
|
+
log = Fluent::Log.new(logger, {ignore_repeated_log_interval: 5})
|
375
|
+
|
376
|
+
log.error message
|
377
|
+
10.times { |i|
|
378
|
+
Timecop.freeze(@timestamp + i)
|
379
|
+
log.error message
|
380
|
+
}
|
381
|
+
|
382
|
+
expected = [
|
383
|
+
"2016-04-21 02:58:41 +0000 [error]: This is test\n",
|
384
|
+
"2016-04-21 02:58:47 +0000 [error]: This is test\n"
|
385
|
+
]
|
386
|
+
assert_equal(expected, log.out.logs)
|
387
|
+
end
|
388
|
+
|
389
|
+
def test_different_message
|
390
|
+
message = "This is test"
|
391
|
+
logger = ServerEngine::DaemonLogger.new(@log_device, {log_level: ServerEngine::DaemonLogger::INFO})
|
392
|
+
log = Fluent::Log.new(logger, {ignore_repeated_log_interval: 10})
|
393
|
+
|
394
|
+
log.error message
|
395
|
+
3.times { |i|
|
396
|
+
Timecop.freeze(@timestamp + i)
|
397
|
+
log.error message
|
398
|
+
log.error message
|
399
|
+
log.info "Hello! " + message
|
400
|
+
}
|
401
|
+
|
402
|
+
expected = [
|
403
|
+
"2016-04-21 02:58:41 +0000 [error]: This is test\n",
|
404
|
+
"2016-04-21 02:58:41 +0000 [info]: Hello! This is test\n",
|
405
|
+
"2016-04-21 02:58:42 +0000 [error]: This is test\n",
|
406
|
+
"2016-04-21 02:58:42 +0000 [info]: Hello! This is test\n",
|
407
|
+
"2016-04-21 02:58:43 +0000 [error]: This is test\n",
|
408
|
+
"2016-04-21 02:58:43 +0000 [info]: Hello! This is test\n",
|
409
|
+
]
|
410
|
+
assert_equal(expected, log.out.logs)
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
370
414
|
def test_dup
|
371
415
|
dl_opts = {}
|
372
416
|
dl_opts[:log_level] = ServerEngine::DaemonLogger::TRACE
|
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.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -803,6 +803,10 @@ files:
|
|
803
803
|
- test/plugin_helper/data/cert/cert-with-CRLF.pem
|
804
804
|
- test/plugin_helper/data/cert/cert-with-no-newline.pem
|
805
805
|
- test/plugin_helper/data/cert/cert.pem
|
806
|
+
- test/plugin_helper/data/cert/cert_chains/ca-cert-key.pem
|
807
|
+
- test/plugin_helper/data/cert/cert_chains/ca-cert.pem
|
808
|
+
- test/plugin_helper/data/cert/cert_chains/cert-key.pem
|
809
|
+
- test/plugin_helper/data/cert/cert_chains/cert.pem
|
806
810
|
- test/plugin_helper/data/cert/generate_cert.rb
|
807
811
|
- test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem
|
808
812
|
- test/plugin_helper/data/cert/with_ca/ca-cert-key.pem
|
@@ -834,6 +838,7 @@ files:
|
|
834
838
|
- test/plugin_helper/test_retry_state.rb
|
835
839
|
- test/plugin_helper/test_server.rb
|
836
840
|
- test/plugin_helper/test_service_discovery.rb
|
841
|
+
- test/plugin_helper/test_socket.rb
|
837
842
|
- test/plugin_helper/test_storage.rb
|
838
843
|
- test/plugin_helper/test_thread.rb
|
839
844
|
- test/plugin_helper/test_timer.rb
|
@@ -1031,6 +1036,10 @@ test_files:
|
|
1031
1036
|
- test/plugin_helper/data/cert/cert-with-CRLF.pem
|
1032
1037
|
- test/plugin_helper/data/cert/cert-with-no-newline.pem
|
1033
1038
|
- test/plugin_helper/data/cert/cert.pem
|
1039
|
+
- test/plugin_helper/data/cert/cert_chains/ca-cert-key.pem
|
1040
|
+
- test/plugin_helper/data/cert/cert_chains/ca-cert.pem
|
1041
|
+
- test/plugin_helper/data/cert/cert_chains/cert-key.pem
|
1042
|
+
- test/plugin_helper/data/cert/cert_chains/cert.pem
|
1034
1043
|
- test/plugin_helper/data/cert/generate_cert.rb
|
1035
1044
|
- test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem
|
1036
1045
|
- test/plugin_helper/data/cert/with_ca/ca-cert-key.pem
|
@@ -1062,6 +1071,7 @@ test_files:
|
|
1062
1071
|
- test/plugin_helper/test_retry_state.rb
|
1063
1072
|
- test/plugin_helper/test_server.rb
|
1064
1073
|
- test/plugin_helper/test_service_discovery.rb
|
1074
|
+
- test/plugin_helper/test_socket.rb
|
1065
1075
|
- test/plugin_helper/test_storage.rb
|
1066
1076
|
- test/plugin_helper/test_thread.rb
|
1067
1077
|
- test/plugin_helper/test_timer.rb
|