Skip to content

Commit

Permalink
GoogleCloudPlatform#41 mutiple-line stacktrace combiled with timestam…
Browse files Browse the repository at this point in the history
…p line
  • Loading branch information
zhangxh committed Jul 10, 2018
1 parent 8e56082 commit ca0627c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/fluent/plugin/exception_detector.rb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ def self.supported
RULES_BY_LANG.keys
end

TIME_RULES = [
rule(:start_state, /^\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}/, :time),
rule(:time, /^[\t ]*(?:\D)+/, :time)
]

JAVA_RULES = [
rule(:start_state,
/(?:Exception|Error|Throwable|V8 errors stack trace)[:\r\n]/,
Expand Down Expand Up @@ -134,6 +139,7 @@ def self.supported
).freeze

RULES_BY_LANG = {
time: TIME_RULES,
java: JAVA_RULES,
javascript: JAVA_RULES,
js: JAVA_RULES,
Expand Down

0 comments on commit ca0627c

Please sign in to comment.