fluentd 0.12.35 → 0.12.36

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: d2d3102f961d9f56eeac91f42b95c2599067c951
4
- data.tar.gz: 5f86c48d0a436f06e8f7c4b2b017e6b301041bae
3
+ metadata.gz: f13bb194b66ee28b2bd8cf431379f73d47dcda0f
4
+ data.tar.gz: ca8542ad12a51d6d11f70de34caca3e5a2c559b2
5
5
  SHA512:
6
- metadata.gz: b34637aa560ca457b313f9caf63f5fa8df8fa79398a876efa24299e3f7537719e03c745a5bc302f04f78975a81e6e5b959b4f5867c684cdf8bdf057aef37137d
7
- data.tar.gz: 01b2bec5a9948f4a10e12f66bbe2b91427dfb6127834a9dfba8bf0ba8b28e10a39a1e1dd6dad1241b18a781b640cb03aff2924cd9713956e2f2fc6e87831fd5f
6
+ metadata.gz: fa2d7ec85fa220ae426509a3f97b1438521b8451b82bfed553097fd40fc7805e0f9e6e4f396c08d4b5e5ea7b4308809be43f060f1744e27811dc56f31e8b0c8f
7
+ data.tar.gz: 99d942d58b3e04e6f172849ae60c4c23bb2abe259bdbcdd6297803fb005ba57905caf5ceaef320c7a051686b0bec7bb47081f0fbac20c13041eff903ec18af44
data/ChangeLog CHANGED
@@ -1,5 +1,25 @@
1
1
  # v0.12
2
2
 
3
+ ## Release 0.12.36 - 2017/05/24
4
+
5
+ ### New features / Enhancement
6
+
7
+ * config: Allow null byte in double-quoted string
8
+ https://github.com/fluent/fluentd/pull/1552
9
+ * parser: Support %iso8601 special case for time_format
10
+ https://github.com/fluent/fluentd/pull/1562
11
+ * in_tail: Add ignore_repeated_permission_error parameter
12
+ https://github.com/fluent/fluentd/pull/1574
13
+
14
+ ### Bug fixes
15
+
16
+ * in_monitor_agent: Enable in_monitor_agent to find plugin type from its class
17
+ https://github.com/fluent/fluentd/pull/1564
18
+ * Ruby 2.4 warns to forward private methods
19
+ https://github.com/fluent/fluentd/pull/1579
20
+ * log: Add missing '<<' method to delegators
21
+ https://github.com/fluent/fluentd/pull/1558
22
+
3
23
  ## Release 0.12.35 - 2017/04/19
4
24
 
5
25
  ### Bug fixes
@@ -181,6 +181,8 @@ module Fluent
181
181
  "\f"
182
182
  when "b"
183
183
  "\b"
184
+ when "0"
185
+ "\0"
184
186
  when /[a-zA-Z0-9]/
185
187
  parse_error! "unexpected back-slash escape character '#{c}'"
186
188
  else # symbols
@@ -248,25 +248,6 @@ module Fluent
248
248
  @out.flush
249
249
  end
250
250
 
251
- private
252
-
253
- def dump_stacktrace(backtrace, level)
254
- return if @level > level
255
-
256
- time = Time.now
257
- line = caller_line(time, 5, level)
258
- if @suppress_repeated_stacktrace && (Thread.current[:last_repeated_stacktrace] == backtrace)
259
- puts [" ", line, 'suppressed same stacktrace'].join
260
- else
261
- backtrace.each { |msg|
262
- puts [" ", line, msg].join
263
- }
264
- Thread.current[:last_repeated_stacktrace] = backtrace if @suppress_repeated_stacktrace
265
- end
266
-
267
- nil
268
- end
269
-
270
251
  def event(level, args)
271
252
  time = Time.now
272
253
  message = ''
@@ -310,6 +291,25 @@ module Fluent
310
291
  end
311
292
  return log_msg
312
293
  end
294
+
295
+ private
296
+
297
+ def dump_stacktrace(backtrace, level)
298
+ return if @level > level
299
+
300
+ time = Time.now
301
+ line = caller_line(time, 5, level)
302
+ if @suppress_repeated_stacktrace && (Thread.current[:last_repeated_stacktrace] == backtrace)
303
+ puts [" ", line, 'suppressed same stacktrace'].join
304
+ else
305
+ backtrace.each { |msg|
306
+ puts [" ", line, msg].join
307
+ }
308
+ Thread.current[:last_repeated_stacktrace] = backtrace if @suppress_repeated_stacktrace
309
+ end
310
+
311
+ nil
312
+ end
313
313
  end
314
314
 
315
315
 
@@ -342,7 +342,7 @@ module Fluent
342
342
  extend Forwardable
343
343
  def_delegators '@logger', :enable_color?, :enable_debug, :enable_event,
344
344
  :disable_events, :tag, :tag=, :time_format, :time_format=,
345
- :event, :caller_line, :puts, :write, :flush, :out, :out=
345
+ :event, :caller_line, :puts, :write, :<<, :flush, :out, :out=
346
346
  end
347
347
 
348
348
 
@@ -71,7 +71,11 @@ module Fluent
71
71
  @cache2_time = nil
72
72
  @parser =
73
73
  if time_format
74
- Proc.new { |value| Time.strptime(value, time_format) }
74
+ if time_format == '%iso8601'
75
+ Proc.new { |value| Time.iso8601(value) }
76
+ else
77
+ Proc.new { |value| Time.strptime(value, time_format) }
78
+ end
75
79
  else
76
80
  Time.method(:parse)
77
81
  end
@@ -379,7 +379,7 @@ module Fluent
379
379
  # multiple plugins could have the same type
380
380
  def plugins_info_by_type(type, opts={})
381
381
  array = all_plugins.select {|pe|
382
- (pe.config['@type'] == type || pe.config['type'] == type) rescue nil
382
+ (pe.config['@type'] == type || pe.config['type'] == type || Fluent::Plugin.lookup_name_from_class(pe.class)) rescue nil
383
383
  }
384
384
  array.map {|pe|
385
385
  get_monitor_info(pe, opts)
@@ -403,7 +403,7 @@ module Fluent
403
403
  # Common plugin information
404
404
  obj['plugin_id'] = pe.plugin_id
405
405
  obj['plugin_category'] = plugin_category(pe)
406
- obj['type'] = pe.config['@type'] || pe.config['type']
406
+ obj['type'] = pe.config['@type'] || pe.config['type'] || Fluent::Plugin.lookup_name_from_class(pe.class)
407
407
  obj['config'] = pe.config if opts[:with_config]
408
408
 
409
409
  # run MONITOR_INFO in plugins' instance context and store the info to obj
@@ -28,6 +28,7 @@ module Fluent
28
28
  super
29
29
  @paths = []
30
30
  @tails = {}
31
+ @ignore_list = []
31
32
  end
32
33
 
33
34
  desc 'The paths to read. Multiple paths can be specified, separated by comma.'
@@ -62,6 +63,8 @@ module Fluent
62
63
  config_param :limit_recently_modified, :time, default: nil
63
64
  desc 'Enable the option to skip the refresh of watching list on startup.'
64
65
  config_param :skip_refresh_on_startup, :bool, default: false
66
+ desc 'Ignore repeated permission error logs'
67
+ config_param :ignore_repeated_permission_error, :bool, default: false
65
68
 
66
69
  attr_reader :paths
67
70
 
@@ -166,7 +169,10 @@ module Fluent
166
169
  end
167
170
  else
168
171
  if is_file
169
- log.warn "#{p} unreadable. It is excluded and would be examined next time."
172
+ unless @ignore_list.include?(path)
173
+ log.warn "#{p} unreadable. It is excluded and would be examined next time."
174
+ @ignore_list << path if @ignore_repeated_permission_error
175
+ end
170
176
  end
171
177
  false
172
178
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '0.12.35'
19
+ VERSION = '0.12.36'
20
20
 
21
21
  end
@@ -105,8 +105,8 @@ module Fluent::Config
105
105
  test('"\\.t"') { assert_text_parsed_as(".t", '"\\.t"') }
106
106
  test('"\\$t"') { assert_text_parsed_as("$t", '"\\$t"') }
107
107
  test('"\\"') { assert_text_parsed_as("#t", '"\\#t"') }
108
+ test('"\\0"') { assert_text_parsed_as("\0", '"\\0"') }
108
109
  test('"\\z"') { assert_parse_error('"\\z"') } # unknown escaped character
109
- test('"\\0"') { assert_parse_error('"\\0"') } # unknown escaped character
110
110
  test('"\\1"') { assert_parse_error('"\\1"') } # unknown escaped character
111
111
  test('"t') { assert_parse_error('"t') } # non-terminated quoted character
112
112
  test("\"t\nt\"") { assert_text_parsed_as("t\nt", "\"t\nt\"" ) } # multiline string
@@ -50,6 +50,7 @@ class TailInputTest < Test::Unit::TestCase
50
50
  assert_equal 2, d.instance.rotate_wait
51
51
  assert_equal "#{TMP_DIR}/tail.pos", d.instance.pos_file
52
52
  assert_equal 1000, d.instance.read_lines_limit
53
+ assert_equal false, d.instance.ignore_repeated_permission_error
53
54
  end
54
55
 
55
56
  def test_configure_encoding
@@ -307,6 +307,8 @@ class PluginLoggerTest < Test::Unit::TestCase
307
307
 
308
308
  def test_write_alias
309
309
  assert(@log.respond_to?(:<<))
310
+ mock(@log.out).write("log")
311
+ @log << "log"
310
312
  end
311
313
 
312
314
  def test_out
@@ -74,6 +74,15 @@ module ParserTest
74
74
  assert_equal_event_time(time, parser.parse('28/Feb/2013:12:00:00 +0900'))
75
75
  end
76
76
 
77
+ data('with sec' => '2017-01-01T12:00:00+09:00',
78
+ 'with msec' => '2017-01-01T12:00:00.123+09:00')
79
+ def test_parse_with_iso8601(data)
80
+ parser = TextParser::TimeParser.new('%iso8601')
81
+
82
+ time = event_time(data)
83
+ assert_equal_event_time(time, parser.parse(data))
84
+ end
85
+
77
86
  def test_parse_with_invalid_argument
78
87
  parser = TextParser::TimeParser.new(nil)
79
88
 
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.12.35
4
+ version: 0.12.36
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-04-19 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack