diff --git a/lib/fluent/plugin/exception_detector.rb b/lib/fluent/plugin/exception_detector.rb index 96e41e7..841bb41 100644 --- a/lib/fluent/plugin/exception_detector.rb +++ b/lib/fluent/plugin/exception_detector.rb @@ -53,9 +53,9 @@ def self.supported rule(:start_state, /(?:Exception|Error|Throwable|V8 errors stack trace)[:\r\n]/, :java), - rule(:java, /^[\t ]+(?:eval )?at /, :java), - rule(:java, /^[\t ]*(?:Caused by|Suppressed):/, :java), - rule(:java, /^[\t ]*... \d+\ more/, :java) + rule(:java, /^(\\u0009|[\t ])+(?:eval )?at /, :java), + rule(:java, /^(\\u0009|[\t ])*(?:Caused by|Suppressed):/, :java), + rule(:java, /^(\\u0009|[\t ])*... \d+\ more/, :java) ].freeze PYTHON_RULES = [ diff --git a/test/plugin/test_exception_detector.rb b/test/plugin/test_exception_detector.rb index e260c9e..24bf244 100644 --- a/test/plugin/test_exception_detector.rb +++ b/test/plugin/test_exception_detector.rb @@ -30,6 +30,70 @@ class ExceptionDetectorTest < Test::Unit::TestCase JAVA_EXC = (JAVA_EXC_PART1 + JAVA_EXC_PART2).freeze + COMPLEX_JAVA_EXC_TABS = <