fluent-plugin-elb-access-log 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b6fd483aeb5428ce74df156ed7efe4990cee287
4
- data.tar.gz: f34fee8557781f1756558a9945b83d77b4f104e9
3
+ metadata.gz: 8babea1edc5739a9afc51f0099e048eb9a0d5d11
4
+ data.tar.gz: 3d6cc19dcd2d465760760f9a390d369cd46af5b7
5
5
  SHA512:
6
- metadata.gz: 1ac2032b68b88c5985910767a0bec383cc6bab13eb58c983fcac3b0e23d8f4529a15d464fc08ac9834f4c32a29b10cf991e789652f3c641974ebd3ec9f1ba248
7
- data.tar.gz: 5606a780fb2c93df73c350baa05ac9f12cd7adb42720f1031c50cc325ef20e76844d1c74edb2ca318cb2a6bc6ae2fec90816f72494568d8877cd93168a0c2513
6
+ metadata.gz: f6087853006afd17b4e23e632c1aa6c1e84270b7c5772b191824392f85fa91d078b0cc7a1d41d9278bccf2fd7dbe12447a1f80a557a17f2953acbd1911b1d199
7
+ data.tar.gz: 9412058d6400f28ca2f67afed583ca2b8f547a64dfc3644919f8e9c01c12f5d634c998ac5f42a778175a0c040c4fbb419702cbbd4f84a0b7e24e8701478c7be5
@@ -155,9 +155,17 @@ class Fluent::ElbAccessLogInput < Fluent::Input
155
155
  access_log = sampling(access_log)
156
156
  end
157
157
 
158
- access_log = CSV.parse(access_log, :col_sep => ' ')
158
+ parsed_access_log = []
159
159
 
160
- access_log.each do |row|
160
+ access_log.split("\n").each do |line|
161
+ begin
162
+ parsed_access_log << CSV.parse_line(line, :col_sep => ' ')
163
+ rescue => e
164
+ @log.warn(e.message)
165
+ end
166
+ end
167
+
168
+ parsed_access_log.each do |row|
161
169
  record = Hash[ACCESS_LOG_FIELDS.keys.zip(row)]
162
170
 
163
171
  ACCESS_LOG_FIELDS.each do |name, conv|
@@ -1,3 +1,3 @@
1
1
  module FluentPluginElbAccessLog
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-elb-access-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara