Skip to content

Commit 1920a9f

Browse files
committed
in_windows_eventlog2: remove trailing ':' and spaces at once
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent 8261dec commit 1920a9f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/fluent/plugin/in_windows_eventlog2.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,7 @@ def parse_desc(record)
417417
r.split(NONE_FIELD_DELIMITER)
418418
end
419419
key = "" if key.nil?
420-
key.strip! # parsed key sometimes contain unexpected " ". So remove it.
421-
key.chop! # remove ':' from key
420+
key.sub!(/:\s*$/, '') # remove ':' from key
422421
if value.nil?
423422
parent_key = to_key(key)
424423
else

0 commit comments

Comments
 (0)