fluentd 0.10.54 → 0.10.55
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.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/fluent/config/v1_parser.rb +8 -1
- data/lib/fluent/version.rb +1 -1
- data/test/config/test_config_parser.rb +33 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f6c7392b51882506144d22dbef860923ca396a8
|
4
|
+
data.tar.gz: 57b91cf45454978c20ae3a497502c2b41580d29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09247456a29976eec30ca20b77f69bc5179a82fdbe1052133234e7b926bb8fd403bf951ea478d0fc0a9f4ba54cbfded565bf653717b350178ada538c08baac6c
|
7
|
+
data.tar.gz: 8f9dd61a23a67c4e90b937cdfa5d7ed881f54853ae1fe9b942f0b19e648472f8714d394af6ed21e5848b9a0a245af86974d55a28760da3c759a5e3eadf7ad671
|
data/ChangeLog
CHANGED
@@ -49,6 +49,8 @@ module Fluent
|
|
49
49
|
return root
|
50
50
|
end
|
51
51
|
|
52
|
+
ELEM_SYMBOLS = ['match', 'source', 'filter', 'system']
|
53
|
+
|
52
54
|
def parse_element(root_element, elem_name, attrs = {}, elems = [])
|
53
55
|
while true
|
54
56
|
spacing
|
@@ -107,7 +109,12 @@ module Fluent
|
|
107
109
|
parse_include(attrs, elems)
|
108
110
|
else
|
109
111
|
if k.start_with?('@')
|
110
|
-
|
112
|
+
if root_element || ELEM_SYMBOLS.include?(elem_name)
|
113
|
+
parse_error! "'@' is the system reserved prefix. Don't use '@' prefix parameter in the configuration: #{k}"
|
114
|
+
else
|
115
|
+
# TODO: This is for backward compatibility. It will throw an error in the future.
|
116
|
+
$log.warn "'@' is the system reserved prefix. It works in the nested configuration for now but it will be rejected: #{k}"
|
117
|
+
end
|
111
118
|
end
|
112
119
|
|
113
120
|
v = parse_literal
|
data/lib/fluent/version.rb
CHANGED
@@ -154,8 +154,39 @@ module Fluent::Config
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
-
|
158
|
-
|
157
|
+
data(
|
158
|
+
"in match" => %[
|
159
|
+
<match>
|
160
|
+
@k v
|
161
|
+
</match>
|
162
|
+
],
|
163
|
+
"in source" => %[
|
164
|
+
<source>
|
165
|
+
@k v
|
166
|
+
</source>
|
167
|
+
],
|
168
|
+
"in filter" => %[
|
169
|
+
<filter>
|
170
|
+
@k v
|
171
|
+
</filter>
|
172
|
+
],
|
173
|
+
"in top-level" => ' @k v '
|
174
|
+
)
|
175
|
+
def test_rejects_at_prefix_in_the_parameter_name(data)
|
176
|
+
assert_parse_error(data)
|
177
|
+
end
|
178
|
+
|
179
|
+
data(
|
180
|
+
"in nested" => %[
|
181
|
+
<match>
|
182
|
+
<record>
|
183
|
+
@k v
|
184
|
+
</record>
|
185
|
+
</match>
|
186
|
+
]
|
187
|
+
)
|
188
|
+
def test_not_reject_at_prefix_in_the_parameter_name(data)
|
189
|
+
assert_nothing_raised { parse_text(data) }
|
159
190
|
end
|
160
191
|
end
|
161
192
|
|