Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Log: Added support for Java stack traces #3003

Merged
merged 3 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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