From 0b5a3b02323aae1e1ea67210fa8d98808faf3d9e Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Wed, 26 Sep 2018 16:21:50 +0900 Subject: [PATCH] Fix regexp for RFC5424 to parse message includes PID properly In previous version, pid field is too greedy. See also https://tools.ietf.org/html/rfc5424#section-6 and #2068 Signed-off-by: Kenji Okimoto --- lib/fluent/plugin/parser_syslog.rb | 4 ++-- test/plugin/test_parser_syslog.rb | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/fluent/plugin/parser_syslog.rb b/lib/fluent/plugin/parser_syslog.rb index 998828430c..778818a145 100644 --- a/lib/fluent/plugin/parser_syslog.rb +++ b/lib/fluent/plugin/parser_syslog.rb @@ -27,8 +27,8 @@ class SyslogParser < Parser REGEXP = /^(?