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 +8 -0
- data/VERSION +1 -1
- data/fluentd.gemspec +1 -1
- data/lib/fluent/mixin.rb +57 -31
- data/lib/fluent/plugin/buf_memory.rb +1 -1
- data/lib/fluent/plugin/out_stream.rb +1 -2
- data/lib/fluent/version.rb +1 -1
- metadata +3 -3
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.
|
1
|
+
0.10.1
|
data/fluentd.gemspec
CHANGED
data/lib/fluent/mixin.rb
CHANGED
@@ -104,40 +104,51 @@ end
|
|
104
104
|
module SetTimeKeyMixin
|
105
105
|
include RecordFilterMixin
|
106
106
|
|
107
|
-
|
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
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
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
|
126
|
-
|
127
|
-
|
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
|
-
|
130
|
-
|
131
|
-
|
132
|
-
@localtime = false
|
133
|
-
end
|
130
|
+
if time_format = conf['time_format']
|
131
|
+
@time_format = time_format
|
132
|
+
end
|
134
133
|
|
135
|
-
|
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
|
-
|
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
|
-
|
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
|
159
|
-
|
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
|
-
|
189
|
+
if @include_tag_key
|
190
|
+
record[@tag_key] = tag
|
191
|
+
end
|
166
192
|
end
|
167
193
|
end
|
168
194
|
|
data/lib/fluent/version.rb
CHANGED
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:
|
4
|
+
hash: 53
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 0.10.
|
9
|
+
- 1
|
10
|
+
version: 0.10.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sadayuki Furuhashi
|