fluentd 0.10.17 → 0.10.18

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.18 - 2012/04/13
3
+
4
+ * Use Yajl instead of standard json library to avoid encoding problem
5
+ * buf_memory: call force_encoding('ASCII-8BIT') to avoid encoding problem
6
+
7
+
2
8
  Release 0.10.17 - 2012/04/02
3
9
 
4
10
  * in_tail: don't ignore last line without LF [#44]
@@ -45,8 +45,8 @@ An event consists of *tag*, *time* and *record*. Tag is a string separated with
45
45
 
46
46
  $ gem install fluentd
47
47
  $ # install sample configuration file to the directory
48
- $ sudo fluentd -s
49
- $ fluentd &
48
+ $ fluentd -s conf
49
+ $ fluentd -c conf/fluent.conf &
50
50
  $ echo '{"json":"message"}' | fluent-cat debug.test
51
51
 
52
52
  == Meta
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.17
1
+ 0.10.18
@@ -84,7 +84,7 @@ end
84
84
  require 'thread'
85
85
  require 'monitor'
86
86
  require 'socket'
87
- require 'json'
87
+ require 'yajl'
88
88
  require 'msgpack'
89
89
 
90
90
 
@@ -250,7 +250,7 @@ class Writer
250
250
  end
251
251
 
252
252
  def abort_message(time, record)
253
- $stdout.puts "!#{time}:#{record.to_json}"
253
+ $stdout.puts "!#{time}:#{Yajl.dump(record)}"
254
254
  end
255
255
  end
256
256
 
@@ -272,7 +272,7 @@ case format
272
272
  when 'json'
273
273
  begin
274
274
  while line = $stdin.gets
275
- record = JSON.parse(line)
275
+ record = Yajl.load(line)
276
276
  w.write(record)
277
277
  end
278
278
  rescue
@@ -5,6 +5,7 @@ require 'monitor'
5
5
  require 'stringio'
6
6
  require 'fileutils'
7
7
  require 'json'
8
+ require 'yajl'
8
9
  require 'uri'
9
10
  require 'msgpack'
10
11
  require 'cool.io'
@@ -21,10 +21,12 @@ module Fluent
21
21
  class MemoryBufferChunk < BufferChunk
22
22
  def initialize(key, data='')
23
23
  @data = data
24
+ @data.force_encoding('ASCII-8BIT')
24
25
  super(key)
25
26
  end
26
27
 
27
28
  def <<(data)
29
+ data.force_encoding('ASCII-8BIT')
28
30
  @data << data
29
31
  end
30
32
 
@@ -22,8 +22,6 @@ class ForwardInput < Input
22
22
  Plugin.register_input('forward', self)
23
23
 
24
24
  def initialize
25
- require 'socket'
26
- require 'yajl'
27
25
  super
28
26
  end
29
27
 
@@ -69,7 +69,7 @@ class FileOutput < TimeSlicedOutput
69
69
 
70
70
  def format(tag, time, record)
71
71
  time_str = @timef.format(time)
72
- "#{time_str}\t#{tag}\t#{record.to_json}\n"
72
+ "#{time_str}\t#{tag}\t#{Yajl.dump(record)}\n"
73
73
  end
74
74
 
75
75
  def write(chunk)
@@ -23,7 +23,7 @@ class StdoutOutput < Output
23
23
 
24
24
  def emit(tag, es, chain)
25
25
  es.each {|time,record|
26
- puts "#{Time.at(time).localtime} #{tag}: #{record.to_json}"
26
+ puts "#{Time.at(time).localtime} #{tag}: #{Yajl.dump(record)}"
27
27
  }
28
28
  chain.next
29
29
  end
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.17'
3
+ VERSION = '0.10.18'
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.17
4
+ version: 0.10.18
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-02 00:00:00.000000000Z
12
+ date: 2012-04-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
16
- requirement: &70102411888840 !ruby/object:Gem::Requirement
16
+ requirement: &70290194123200 !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: *70102411888840
24
+ version_requirements: *70290194123200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70102411888180 !ruby/object:Gem::Requirement
27
+ requirement: &70290194122380 !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: *70102411888180
35
+ version_requirements: *70290194122380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yajl-ruby
38
- requirement: &70102411887560 !ruby/object:Gem::Requirement
38
+ requirement: &70290194121680 !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: *70102411887560
46
+ version_requirements: *70290194121680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cool.io
49
- requirement: &70102411886940 !ruby/object:Gem::Requirement
49
+ requirement: &70290194120960 !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: *70102411886940
57
+ version_requirements: *70290194120960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: http_parser.rb
60
- requirement: &70102411886280 !ruby/object:Gem::Requirement
60
+ requirement: &70290194120180 !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: *70102411886280
68
+ version_requirements: *70290194120180
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
- requirement: &70102411885660 !ruby/object:Gem::Requirement
71
+ requirement: &70290194119440 !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: *70102411885660
79
+ version_requirements: *70290194119440
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rr
82
- requirement: &70102411885040 !ruby/object:Gem::Requirement
82
+ requirement: &70290194118780 !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: *70102411885040
90
+ version_requirements: *70290194118780
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: timecop
93
- requirement: &70102411884420 !ruby/object:Gem::Requirement
93
+ requirement: &70290194117960 !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: *70102411884420
101
+ version_requirements: *70290194117960
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: jeweler
104
- requirement: &70102411883800 !ruby/object:Gem::Requirement
104
+ requirement: &70290194117240 !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: *70102411883800
112
+ version_requirements: *70290194117240
113
113
  description:
114
114
  email: frsyuki@gmail.com
115
115
  executables: