Skip to content

Commit

Permalink
Log: Added support for Java stack traces (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Aug 5, 2021
1 parent c1dce99 commit b0365e7
Show file tree
Hide file tree
Showing 12 changed files with 5,120 additions and 908 deletions.
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@
},
"log": {
"title": "Log file",
"optional": "javastacktrace",
"owner": "RunDevelopment"
},
"lolcode": {
Expand Down
12 changes: 12 additions & 0 deletions components/prism-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Prism.languages.log = {
greedy: true,
},

'exception': {
pattern: /(^|[^\w.])[a-z][\w.]*(?:Exception|Error):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,
lookbehind: true,
greedy: true,
alias: ['javastacktrace', 'language-javastacktrace'],
inside: Prism.languages['javastacktrace'] || {
'keyword': /\bat\b/,
'function': /[a-z_][\w$]*(?=\()/,
'punctuation': /[.:()]/
}
},

'level': [
{
pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-log.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b0365e7

Please sign in to comment.