fluentd 0.10.18 → 0.10.19

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,11 @@
1
1
 
2
+ Release 0.10.19 - 2012/04/13
3
+
4
+ * Fixed in_syslog
5
+ * in_tail: fixed "invalid byte sequence in US-ASCII" error
6
+ * in_unix is not obsoleted
7
+
8
+
2
9
  Release 0.10.18 - 2012/04/13
3
10
 
4
11
  * Use Yajl instead of standard json library to avoid encoding problem
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.18
1
+ 0.10.19
@@ -175,7 +175,6 @@ class TcpInput < ForwardInput
175
175
  end
176
176
 
177
177
 
178
- # obsolete
179
178
  class UnixInput < StreamInput
180
179
  Plugin.register_input('unix', self)
181
180
 
@@ -183,7 +182,7 @@ class UnixInput < StreamInput
183
182
 
184
183
  def configure(conf)
185
184
  super
186
- $log.warn "'unix' input is obsoleted and will be removed. Use 'forward' instead."
185
+ #$log.warn "'unix' input is obsoleted and will be removed. Use 'forward' instead."
187
186
  end
188
187
 
189
188
  def listen
@@ -89,9 +89,34 @@ class SyslogInput < Input
89
89
  else
90
90
  callback = method(:receive_data)
91
91
  end
92
- EventMachine.open_datagram_socket(@bind, @port, UdpHandler, callback)
92
+
93
+ @loop = Coolio::Loop.new
94
+
95
+ $log.debug "listening syslog socket on #{@bind}:#{@port}"
96
+ @usock = UDPSocket.new
97
+ @usock.bind(@bind, @port)
98
+
99
+ @handler = UdpHandler.new(@usock, callback)
100
+ @loop.attach(@handler)
101
+
102
+ @thread = Thread.new(&method(:run))
103
+ end
104
+
105
+ def shutdown
106
+ @loop.watchers.each {|w| w.detach }
107
+ @loop.stop
108
+ @handler.close
109
+ @thread.join
110
+ end
111
+
112
+ def run
113
+ @loop.run
114
+ rescue
115
+ $log.error "unexpected error", :error=>$!.to_s
116
+ $log.error_backtrace
93
117
  end
94
118
 
119
+ protected
95
120
  def receive_data_parser(data)
96
121
  m = SYSLOG_REGEXP.match(data)
97
122
  unless m
@@ -156,16 +181,21 @@ class SyslogInput < Input
156
181
  Engine.emit(tag, time, record)
157
182
  end
158
183
 
159
- class UdpHandler < EventMachine::Connection
160
- def initialize(callback)
161
- super()
184
+ class UdpHandler < Coolio::IO
185
+ def initialize(io, callback)
186
+ super(io)
187
+ @io = io
162
188
  @callback = callback
163
189
  end
164
190
 
165
- def receive_data(data)
166
- EventMachine.defer {
167
- @callback.call(data)
168
- }
191
+ def on_readable
192
+ msg, addr = @io.recvfrom_nonblock(1024)
193
+ #host = addr[3]
194
+ #port = addr[1]
195
+ #@callback.call(host, port, msg)
196
+ @callback.call(msg)
197
+ rescue
198
+ # TODO log?
169
199
  end
170
200
  end
171
201
  end
@@ -261,8 +261,8 @@ class TailInput < Input
261
261
  @io = io
262
262
  @pe = pe
263
263
  @receive_lines = receive_lines
264
- @buffer = ''
265
- @iobuf = ''
264
+ @buffer = ''.force_encoding('ASCII-8BIT')
265
+ @iobuf = ''.force_encoding('ASCII-8BIT')
266
266
  end
267
267
 
268
268
  attr_reader :io
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.18'
3
+ VERSION = '0.10.19'
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.18
4
+ version: 0.10.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-14 00:00:00.000000000Z
12
+ date: 2012-04-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
16
- requirement: &70290194123200 !ruby/object:Gem::Requirement
16
+ requirement: &70342941850580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.4.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70290194123200
24
+ version_requirements: *70342941850580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70290194122380 !ruby/object:Gem::Requirement
27
+ requirement: &70342941849920 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.4.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70290194122380
35
+ version_requirements: *70342941849920
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yajl-ruby
38
- requirement: &70290194121680 !ruby/object:Gem::Requirement
38
+ requirement: &70342941849140 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70290194121680
46
+ version_requirements: *70342941849140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cool.io
49
- requirement: &70290194120960 !ruby/object:Gem::Requirement
49
+ requirement: &70342941848200 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70290194120960
57
+ version_requirements: *70342941848200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: http_parser.rb
60
- requirement: &70290194120180 !ruby/object:Gem::Requirement
60
+ requirement: &70342941847500 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.5.1
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70290194120180
68
+ version_requirements: *70342941847500
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &70290194119440 !ruby/object:Gem::Requirement
71
+ requirement: &70342941846860 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.9.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70290194119440
79
+ version_requirements: *70342941846860
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rr
82
- requirement: &70290194118780 !ruby/object:Gem::Requirement
82
+ requirement: &70342941846100 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70290194118780
90
+ version_requirements: *70342941846100
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: timecop
93
- requirement: &70290194117960 !ruby/object:Gem::Requirement
93
+ requirement: &70342941845440 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.3.0
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70290194117960
101
+ version_requirements: *70342941845440
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: jeweler
104
- requirement: &70290194117240 !ruby/object:Gem::Requirement
104
+ requirement: &70342941844840 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 1.0.0
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70290194117240
112
+ version_requirements: *70342941844840
113
113
  description:
114
114
  email: frsyuki@gmail.com
115
115
  executables: