fluentd 0.10.0 → 0.10.1

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,12 @@
1
1
 
2
+ Release 0.10.1 - 2011/10/16
3
+
4
+ * SetTimeKeyMixin accepts include_time_key parameter
5
+ * SetTagKeyMixin accepts include_tag_key parameter
6
+ * Fixed Makefile.am
7
+ * Fixed MemoryBufferChunk#msgpack_each
8
+
9
+
2
10
  Release 0.10.0 - 2011/10/16
3
11
 
4
12
  * Removed Event class
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.0
1
+ 0.10.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fluentd}
8
- s.version = "0.10.0"
8
+ s.version = "0.10.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sadayuki Furuhashi"]
@@ -104,40 +104,51 @@ end
104
104
  module SetTimeKeyMixin
105
105
  include RecordFilterMixin
106
106
 
107
- def initialize
108
- super
109
- @time_key = "time"
110
- @localtime = true
111
- end
112
-
113
- attr_accessor :time_key, :localtime
107
+ attr_accessor :include_time_key, :time_key, :localtime
114
108
 
115
109
  def configure(conf)
116
110
  super
117
111
 
118
- if time_key = conf['time_key']
119
- @time_key = time_key
120
- end
121
- unless @time_key
122
- @time_key = 'time'
112
+ if s = conf['include_time_key']
113
+ b = Config.bool_value(s)
114
+ if s.empty?
115
+ b = true
116
+ elsif b == nil
117
+ raise ConfigError, "Invalid boolean expression '#{s}' for include_time_key parameter"
118
+ end
119
+ @include_time_key = b
123
120
  end
124
121
 
125
- if time_format = conf['time_format']
126
- @time_format = time_format
127
- end
122
+ if @include_time_key
123
+ if time_key = conf['time_key']
124
+ @time_key = time_key
125
+ end
126
+ unless @time_key
127
+ @time_key = 'time'
128
+ end
128
129
 
129
- if localtime = conf['localtime']
130
- @localtime = true
131
- elsif utc = conf['utc']
132
- @localtime = false
133
- end
130
+ if time_format = conf['time_format']
131
+ @time_format = time_format
132
+ end
134
133
 
135
- @timef = TimeFormatter.new(@time_format, @localtime)
134
+ if localtime = conf['localtime']
135
+ @localtime = true
136
+ elsif utc = conf['utc']
137
+ @localtime = false
138
+ end
139
+
140
+ @timef = TimeFormatter.new(@time_format, @localtime)
141
+
142
+ else
143
+ @include_time_key = false
144
+ end
136
145
  end
137
146
 
138
147
  def filter_record(tag, time, record)
139
148
  super
140
- record[@time_key] = @timef.format(time)
149
+ if @include_time_key
150
+ record[@time_key] = @timef.format(time)
151
+ end
141
152
  end
142
153
  end
143
154
 
@@ -145,24 +156,39 @@ end
145
156
  module SetTagKeyMixin
146
157
  include RecordFilterMixin
147
158
 
148
- def initialize
149
- super
150
- @tag_key = "tag"
151
- end
152
-
153
- attr_accessor :tag_key
159
+ attr_accessor :include_tag_key, :tag_key
154
160
 
155
161
  def configure(conf)
156
162
  super
157
163
 
158
- if tag_key = conf['tag_key']
159
- @tag_key = tag_key
164
+ if s = conf['include_tag_key']
165
+ b = Config.bool_value(s)
166
+ if s.empty?
167
+ b = true
168
+ elsif b == nil
169
+ raise ConfigError, "Invalid boolean expression '#{s}' for include_tag_key parameter"
170
+ end
171
+ @include_tag_key = b
172
+ end
173
+
174
+ if @include_tag_key
175
+ if tag_key = conf['tag_key']
176
+ @tag_key = tag_key
177
+ end
178
+ unless @tag_key
179
+ @tag_key = 'tag'
180
+ end
181
+
182
+ else
183
+ @include_tag_key = false
160
184
  end
161
185
  end
162
186
 
163
187
  def filter_record(tag, time, record)
164
188
  super
165
- record[@time_key] = @timef.format(time)
189
+ if @include_tag_key
190
+ record[@tag_key] = tag
191
+ end
166
192
  end
167
193
  end
168
194
 
@@ -53,7 +53,7 @@ class MemoryBufferChunk < BufferChunk
53
53
 
54
54
  # optimize
55
55
  def msgpack_each(&block)
56
- u = MessagePack::Unpacker.new(io)
56
+ u = MessagePack::Unpacker.new
57
57
  u.feed_each(@data, &block)
58
58
  end
59
59
  end
@@ -20,10 +20,9 @@ module Fluent
20
20
 
21
21
  class StreamOutput < BufferedOutput
22
22
  def initialize
23
- super
24
23
  require 'socket'
25
24
  require 'fileutils'
26
- @send_timeout = 60
25
+ super
27
26
  end
28
27
 
29
28
  config_param :send_timeout, :time, :default => 60
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
 
3
- VERSION = '0.10.0'
3
+ VERSION = '0.10.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 0
10
- version: 0.10.0
9
+ - 1
10
+ version: 0.10.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sadayuki Furuhashi