fluentd 1.3.2-x86-mingw32 → 1.3.3-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6c74963a0b6f7380d92d78ff07d3e00997b315e
4
- data.tar.gz: d730cc064ab4290b7876a384f74f36c60996e690
3
+ metadata.gz: '006458dd9f705395ae78fb21f32e81b064c072ff'
4
+ data.tar.gz: 527ecc83304978b0bd4c1ae4f08caa85e9a0b372
5
5
  SHA512:
6
- metadata.gz: 2a343d805f05926bc6edba14f69e654a0ea9e7800b133a406fe87fe0dcddd4fd3b476ae617385745824d6475045abb7c7e8f5d67f927480b81fc68eff8f5cbb6
7
- data.tar.gz: 80e732799613bb8a3d72ac9cc8848aa850012c8a6b2359ded7174f42de6ffb25b4d39befa9494423d8191d931257aca44560b8bfd2c8b4a0a38cfa8bf4f265fd
6
+ metadata.gz: 74c4d53f7858338daeec3d7e27370879fa588013bf3ae18d5594472647608c23e4e1726b92fb1e81fa8411ce7b30a134905aba4257922285a159ab523e535ccf
7
+ data.tar.gz: be1ab11b7e799e27233fdc84751bf9b4d6c881186540a1ad595b3956f8f53019a7205d4be77176c3acd7bc1c83139f3682be11c5e301dfdb15f3aa40d9683286
@@ -11,12 +11,14 @@ matrix:
11
11
  os: linux
12
12
  - rvm: 2.2.10
13
13
  os: linux
14
- - rvm: 2.3.8
14
+ - rvm: 2.3.7
15
15
  os: linux
16
16
  - rvm: 2.4.5
17
17
  os: linux
18
18
  - rvm: 2.5.3
19
19
  os: linux
20
+ - rvm: 2.6.0
21
+ os: linux
20
22
  - rvm: ruby-head
21
23
  os: linux
22
24
  - rvm: 2.1.10
@@ -50,7 +52,7 @@ branches:
50
52
  - v0.14
51
53
 
52
54
  before_install:
53
- - gem update --system
55
+ - gem update --system=2.7.8
54
56
 
55
57
  sudo: false
56
58
  dist: trusty # for TLSv1.2 support
@@ -1,5 +1,21 @@
1
1
  # v1.3
2
2
 
3
+ ## Release v1.3.3 - 2018/01/06
4
+
5
+ ### Enhancements
6
+
7
+ * parser_syslog: Use String#squeeze for performance improvement
8
+ https://github.com/fluent/fluentd/pull/2239
9
+ * parser_syslog: Support RFC5424 timestamp without subseconds
10
+ https://github.com/fluent/fluentd/pull/2240
11
+
12
+ ### Bug fixes
13
+
14
+ * server: Ignore ECONNRESET in TLS accept to avoid fluentd restart
15
+ https://github.com/fluent/fluentd/pull/2243
16
+ * log: Fix plugin logger ignores fluentd log event setting
17
+ https://github.com/fluent/fluentd/pull/2252
18
+
3
19
  ## Release v1.3.2 - 2018/12/10
4
20
 
5
21
  ### Enhancements
@@ -47,5 +47,5 @@ Gem::Specification.new do |gem|
47
47
  gem.add_development_dependency("timecop", ["~> 0.3"])
48
48
  gem.add_development_dependency("test-unit", ["~> 3.2"])
49
49
  gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
50
- gem.add_development_dependency("oj", ["~> 2.14"])
50
+ gem.add_development_dependency("oj", [">= 2.14", "< 4"])
51
51
  end
@@ -554,7 +554,7 @@ module Fluent
554
554
 
555
555
  extend Forwardable
556
556
  def_delegators '@logger', :get_worker_id, :enable_color?, :enable_debug, :enable_event,
557
- :disable_events, :log_event_enabled, :log_event_enamed=, :time_format, :time_format=,
557
+ :disable_events, :log_event_enabled, :log_event_enabled=, :time_format, :time_format=,
558
558
  :time_formatter, :time_formatter=, :event, :caller_line, :puts, :write, :<<, :flush,
559
559
  :reset, :out, :out=, :optional_header, :optional_header=, :optional_attrs, :optional_attrs=
560
560
  end
@@ -81,6 +81,12 @@ module Fluent
81
81
  end
82
82
 
83
83
  def start
84
+ # By initialization order, plugin logger is created before set log_event_enabled.
85
+ # It causes '@id' specified plugin, it uses plugin logger instead of global logger, ignores `<label @FLUENT_LOG>` setting.
86
+ # This is adhoc approach but impact is minimal.
87
+ if @log.is_a?(Fluent::PluginLogger) && $log.respond_to?(:log_event_enabled) # log_event_enabled check for tests
88
+ @log.log_event_enabled = $log.log_event_enabled
89
+ end
84
90
  @_state.start = true
85
91
  self
86
92
  end
@@ -137,7 +137,7 @@ module Fluent
137
137
  # so it should not added into @metadata_list for now
138
138
  mode = Fluent::Plugin::Buffer::FileChunk.assume_chunk_state(path)
139
139
  if mode == :unknown
140
- log.debug "uknown state chunk found", path: path
140
+ log.debug "unknown state chunk found", path: path
141
141
  next
142
142
  end
143
143
 
@@ -48,6 +48,8 @@ module Fluent
48
48
  super
49
49
 
50
50
  @time_parser_rfc3164 = @time_parser_rfc5424 = nil
51
+ @time_parser_rfc5424_without_subseconds = nil
52
+ @support_rfc5424_without_subseconds = false
51
53
  @regexp = case @message_format
52
54
  when :rfc3164
53
55
  class << self
@@ -59,6 +61,7 @@ module Fluent
59
61
  alias_method :parse, :parse_plain
60
62
  end
61
63
  @time_format = @rfc5424_time_format unless conf.has_key?('time_format')
64
+ @support_rfc5424_without_subseconds = true
62
65
  @with_priority ? REGEXP_RFC5424_WITH_PRI : REGEXP_RFC5424
63
66
  when :auto
64
67
  class << self
@@ -69,6 +72,7 @@ module Fluent
69
72
  nil
70
73
  end
71
74
  @time_parser = time_parser_create
75
+ @time_parser_rfc5424_without_subseconds = time_parser_create(format: "%Y-%m-%dT%H:%M:%S%z")
72
76
  end
73
77
 
74
78
  def patterns
@@ -83,6 +87,7 @@ module Fluent
83
87
  if REGEXP_DETECT_RFC5424.match(text)
84
88
  @regexp = @with_priority ? REGEXP_RFC5424_WITH_PRI : REGEXP_RFC5424
85
89
  @time_parser = @time_parser_rfc5424
90
+ @support_rfc5424_without_subseconds = true
86
91
  else
87
92
  @regexp = @with_priority ? REGEXP_WITH_PRI : REGEXP
88
93
  @time_parser = @time_parser_rfc3164
@@ -106,7 +111,19 @@ module Fluent
106
111
  when "pri"
107
112
  record['pri'] = value.to_i
108
113
  when "time"
109
- time = @mutex.synchronize { @time_parser.parse(value.gsub(/ +/, ' ')) }
114
+ time = @mutex.synchronize do
115
+ time_str = value.squeeze(' ')
116
+ begin
117
+ @time_parser.parse(time_str)
118
+ rescue Fluent::TimeParser::TimeParseError => e
119
+ if @support_rfc5424_without_subseconds
120
+ log.trace(e)
121
+ @time_parser_rfc5424_without_subseconds.parse(time_str)
122
+ else
123
+ raise
124
+ end
125
+ end
126
+ end
110
127
  record[name] = value if @keep_time_key
111
128
  else
112
129
  record[name] = value
@@ -722,7 +722,7 @@ module Fluent
722
722
 
723
723
  return true
724
724
  end
725
- rescue OpenSSL::SSL::SSLError => e
725
+ rescue Errno::ECONNRESET, OpenSSL::SSL::SSLError => e
726
726
  @log.trace "unexpected error before accepting TLS connection", error: e
727
727
  close rescue nil
728
728
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.3.2'
19
+ VERSION = '1.3.3'
20
20
 
21
21
  end
@@ -442,7 +442,7 @@ CONF
442
442
 
443
443
  assert_fluentd_fails_to_start(
444
444
  create_cmdline(conf_path, "-p", File.dirname(plugin_path)),
445
- "in_buggy.rb:5: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)"
445
+ "in_buggy.rb:5: syntax error, unexpected end-of-input, expecting"
446
446
  )
447
447
  end
448
448
  end
@@ -232,6 +232,44 @@ class SyslogParserTest < ::Test::Unit::TestCase
232
232
  assert_nil record["message"]
233
233
  end
234
234
  end
235
+
236
+ def test_parse_with_rfc5424_message_without_subseconds
237
+ @parser.configure(
238
+ 'message_format' => 'rfc5424',
239
+ 'with_priority' => true,
240
+ )
241
+ text = '<16>1 2017-02-06T13:14:15Z 192.168.0.1 fluentd - - - Hi, from Fluentd!'
242
+ @parser.instance.parse(text) do |time, record|
243
+ assert_equal(event_time("2017-02-06T13:14:15Z", format: '%Y-%m-%dT%H:%M:%S%z'), time)
244
+ assert_equal "-", record["pid"]
245
+ assert_equal "-", record["msgid"]
246
+ assert_equal "-", record["extradata"]
247
+ assert_equal "Hi, from Fluentd!", record["message"]
248
+ end
249
+ end
250
+
251
+ def test_parse_with_rfc5424_message_both_timestamp
252
+ @parser.configure(
253
+ 'message_format' => 'rfc5424',
254
+ 'with_priority' => true,
255
+ )
256
+ text = '<16>1 2017-02-06T13:14:15Z 192.168.0.1 fluentd - - - Hi, from Fluentd!'
257
+ @parser.instance.parse(text) do |time, record|
258
+ assert_equal(event_time("2017-02-06T13:14:15Z", format: '%Y-%m-%dT%H:%M:%S%z'), time)
259
+ assert_equal "-", record["pid"]
260
+ assert_equal "-", record["msgid"]
261
+ assert_equal "-", record["extradata"]
262
+ assert_equal "Hi, from Fluentd!", record["message"]
263
+ end
264
+ text = '<16>1 2017-02-06T13:14:15.003Z 192.168.0.1 fluentd - - - Hi, from Fluentd with subseconds!'
265
+ @parser.instance.parse(text) do |time, record|
266
+ assert_equal(event_time("2017-02-06T13:14:15.003Z", format: '%Y-%m-%dT%H:%M:%S.%L%z'), time)
267
+ assert_equal "-", record["pid"]
268
+ assert_equal "-", record["msgid"]
269
+ assert_equal "-", record["extradata"]
270
+ assert_equal "Hi, from Fluentd with subseconds!", record["message"]
271
+ end
272
+ end
235
273
  end
236
274
 
237
275
  class TestAutoRegexp < self
@@ -387,6 +425,17 @@ class SyslogParserTest < ::Test::Unit::TestCase
387
425
  end
388
426
  assert_equal(Fluent::Plugin::SyslogParser::REGEXP_RFC5424_WITH_PRI,
389
427
  @parser.instance.patterns['format'])
428
+
429
+ text = '<16>1 2017-02-06T13:14:15Z 192.168.0.1 fluentd - - - Hi, from Fluentd without subseconds!'
430
+ @parser.instance.parse(text) do |time, record|
431
+ assert_equal(event_time("2017-02-06T13:14:15Z", format: '%Y-%m-%dT%H:%M:%S%z'), time)
432
+ assert_equal "-", record["pid"]
433
+ assert_equal "-", record["msgid"]
434
+ assert_equal "-", record["extradata"]
435
+ assert_equal "Hi, from Fluentd without subseconds!", record["message"]
436
+ end
437
+ assert_equal(Fluent::Plugin::SyslogParser::REGEXP_RFC5424_WITH_PRI,
438
+ @parser.instance.patterns['format'])
390
439
  end
391
440
  end
392
441
  end
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.3.2
4
+ version: 1.3.3
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: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2019-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -352,16 +352,22 @@ dependencies:
352
352
  name: oj
353
353
  requirement: !ruby/object:Gem::Requirement
354
354
  requirements:
355
- - - "~>"
355
+ - - ">="
356
356
  - !ruby/object:Gem::Version
357
357
  version: '2.14'
358
+ - - "<"
359
+ - !ruby/object:Gem::Version
360
+ version: '4'
358
361
  type: :development
359
362
  prerelease: false
360
363
  version_requirements: !ruby/object:Gem::Requirement
361
364
  requirements:
362
- - - "~>"
365
+ - - ">="
363
366
  - !ruby/object:Gem::Version
364
367
  version: '2.14'
368
+ - - "<"
369
+ - !ruby/object:Gem::Version
370
+ version: '4'
365
371
  description: Fluentd is an open source data collector designed to scale and simplify
366
372
  log management. It can collect, process and ship many kinds of data in near real-time.
367
373
  email: