fluentd 0.10.28 → 0.10.29

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.

data/ChangeLog CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ Release 0.10.29 - 2012/11/26
3
+
4
+ * buf_file: added flush_at_shutdown option to force flush before shuttingdown
5
+ * TextParser shows message in warn level if text doesn't match the pattern
6
+
7
+
2
8
  Release 0.10.28 - 2012/10/30
3
9
 
4
10
  * in_http: on_request method can get headers as HTTP_* key and remote address
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.28
1
+ 0.10.29
@@ -35,8 +35,7 @@ class TextParser
35
35
  def call(text)
36
36
  m = @regexp.match(text)
37
37
  unless m
38
- $log.debug "pattern not match: #{text}"
39
- # TODO?
38
+ $log.warn "pattern not match: #{text.inspect}"
40
39
  return nil, nil
41
40
  end
42
41
 
@@ -85,7 +84,7 @@ class TextParser
85
84
 
86
85
  return time, record
87
86
  rescue Yajl::ParseError
88
- # TODO?
87
+ $log.warn "pattern not match: #{text.inspect}: #{$!}"
89
88
  return nil, nil
90
89
  end
91
90
  end
@@ -156,7 +155,7 @@ class TextParser
156
155
  def call(text)
157
156
  m = REGEXP.match(text)
158
157
  unless m
159
- $log.debug "pattern not match: #{text}"
158
+ $log.warn "pattern not match: #{text.inspect}"
160
159
  return nil, nil
161
160
  end
162
161
 
@@ -95,6 +95,12 @@ class FileBuffer < BasicBuffer
95
95
  @buffer_path_prefix = @buffer_path+"."
96
96
  @buffer_path_suffix = ".log"
97
97
  end
98
+
99
+ if flush_at_shutdown = conf['flush_at_shutdown']
100
+ @flush_at_shutdown = true
101
+ else
102
+ @flush_at_shutdown = false
103
+ end
98
104
  end
99
105
 
100
106
  def start
@@ -162,6 +168,18 @@ class FileBuffer < BasicBuffer
162
168
  chunk.mv(npath)
163
169
  end
164
170
 
171
+ def before_shutdown(out)
172
+ if @flush_at_shutdown
173
+ synchronize do
174
+ @map.each_key {|key|
175
+ push(key)
176
+ }
177
+ while pop(out)
178
+ end
179
+ end
180
+ end
181
+ end
182
+
165
183
  protected
166
184
  def encode_key(key)
167
185
  URI.escape(key, /[^-_.a-zA-Z0-9]/n)
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.28'
3
+ VERSION = '0.10.29'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.28
4
+ version: 0.10.29
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-31 00:00:00.000000000 Z
12
+ date: 2012-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack