fluent-plugin-filter-geoip 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-filter-geoip.gemspec +1 -1
- data/lib/fluent/plugin/filter_geoip.rb +6 -1
- 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: 26a2463f0d98d68d9ea2ce3c184a34131a9522b1
|
4
|
+
data.tar.gz: 1105857bdef779c98cd65f8cd53190a4b7c02920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789ae5dc1c1b5d326705266f03c4025438720c4122e8526291eb81819fa32861644edccde13ed6e48ad4bc1dcb8cc540d8c796b91cfce32f79d1cfec9ce6c8ec
|
7
|
+
data.tar.gz: f12393c7400e8bda40919e5e45e5a41bff0b43ce30bdda67ef6d3ec8ec039e82e38030b8f52484e934347bbcc8ecd2a7ec71ba6caa6182e63b73824f0aea3e12
|
@@ -173,7 +173,12 @@ module Fluent
|
|
173
173
|
|
174
174
|
if @subdivisions && geoip_hash.has_key?('subdivisions') then
|
175
175
|
if @flatten then
|
176
|
-
|
176
|
+
i = 0
|
177
|
+
geoip_hash['subdivisions'].each do |subdivision|
|
178
|
+
record.merge!(to_flatten(subdivision, [@field_prefix, 'subdivisions', i.to_s], @field_delimiter))
|
179
|
+
i = i + 1
|
180
|
+
end
|
181
|
+
#record.merge!(to_flatten(geoip_hash['subdivisions'], [@field_prefix, 'subdivisions'], @field_delimiter))
|
177
182
|
else
|
178
183
|
record[[@field_prefix, 'subdivisions'].join(@field_delimiter)] = geoip_hash['subdivisions'].to_json
|
179
184
|
end
|