Skip to content

Commit

Permalink
Added support for Generic log files (#2796)
Browse files Browse the repository at this point in the history
RunDevelopment authored Mar 21, 2021
1 parent 1a2347a commit 2bc6475
Showing 28 changed files with 4,071 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -733,6 +733,10 @@
"title": "LLVM IR",
"owner": "porglezomp"
},
"log": {
"title": "Log file",
"owner": "RunDevelopment"
},
"lolcode": {
"title": "LOLCODE",
"owner": "Golmote"
108 changes: 108 additions & 0 deletions components/prism-log.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// This is a language definition for generic log files.
// Since there is no one log format, this language definition has to support all formats to some degree.
//
// Based on https://github.com/MTDL9/vim-log-highlighting

Prism.languages.log = {
'string': {
// Single-quoted strings must not be confused with plain text. E.g. Can't isn't Susan's Chris' toy
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,
greedy: true,
},

'level': [
{
pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,
alias: ['error', 'important']
},
{
pattern: /\b(?:WARN|WARNING)\b/,
alias: ['warning', 'important']
},
{
pattern: /\b(?:DISPLAY|INFO|NOTICE|STATUS)\b/,
alias: ['info', 'keyword']
},
{
pattern: /\b(?:DEBUG|FINE)\b/,
alias: ['debug', 'keyword']
},
{
pattern: /\b(?:FINER|FINEST|TRACE|VERBOSE)\b/,
alias: ['trace', 'comment']
}
],

'property': {
pattern: /((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,
lookbehind: true
},

'separator': {
pattern: /(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,
lookbehind: true,
alias: 'comment'
},

'url': /\b(?:https?|ftp|file):\/\/[^\s|,;'"]*[^\s|,;'">.]/,
'email': {
pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,
lookbehind: true,
alias: 'url'
},

'ip-address': {
pattern: /\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i,
alias: 'constant'
},
'mac-address': {
pattern: /\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,
alias: 'constant'
},
'domain': {
pattern: /(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,
lookbehind: true,
alias: 'constant'
},

'uuid': {
pattern: /\b\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\b/,
alias: 'constant'
},
'hash': {
pattern: /\b(?:[a-f0-9]{32}){1,2}\b/i,
alias: 'constant'
},

'file-path': {
pattern: /\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,
lookbehind: true,
greedy: true,
alias: 'string'
},

'date': {
pattern: RegExp(
/\b\d{4}[-/]\d{2}[-/]\d{2}T(?=\d{1,2}:)/.source +
'|' +
/\b\d{1,4}[-/ ](?:\d{1,2}|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-/ ]\d{2,4}T?\b/.source +
'|' +
/\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:\s{1,2}(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))?|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s{1,2}\d{1,2}\b/.source,
'i'
),
alias: 'number'
},
'time': {
pattern: /\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2,4}|Z)?\b/,
alias: 'number'
},

'boolean': /\b(?:true|false|null)\b/i,
'number': {
pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,
lookbehind: true
},

'operator': /[;:?<=>~/@!$%&+\-|^(){}*#]/,
'punctuation': /[\[\].,]/
};
1 change: 1 addition & 0 deletions components/prism-log.min.js

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

10 changes: 10 additions & 0 deletions examples/prism-log.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h2>Nginx example</h2>
<pre><code>/47.29.201.179 - - [28/Feb/2019:13:17:10 +0000] "GET /?p=1 HTTP/2.0" 200 5316 "https://domain1.com/?p=1" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" "2.75"</code></pre>
<pre><code>Mar 19 22:10:18 xxxxxx journal: xxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:18 +0000] "GET / HTTP/1.1" 200 1863 "-" "curl/7.29.0" "-"
Mar 19 22:10:24 xxxxxxx journal: xxxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:24 +0000] "GET / HTTP/1.1" 200 53324 "-" "curl/7.29.0" "-"</code></pre>
<pre><code>TLSv1.2 AES128-SHA 1.1.1.1 "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 3.3.3.3 "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 4.4.4.4 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
TLSv1 AES128-SHA 5.5.5.5 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 6.6.6.6 "Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36"</code></pre>
1 change: 1 addition & 0 deletions plugins/show-language/prism-show-language.js
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@
"elisp": "Lisp",
"emacs-lisp": "Lisp",
"llvm": "LLVM IR",
"log": "Log file",
"lolcode": "LOLCODE",
"md": "Markdown",
"markup-templating": "Markup templating",
2 changes: 1 addition & 1 deletion plugins/show-language/prism-show-language.min.js

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

420 changes: 420 additions & 0 deletions tests/languages/log/_discord.test

Large diffs are not rendered by default.

335 changes: 335 additions & 0 deletions tests/languages/log/_docker.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.314696100Z" level=info msg="starting containerd" revision=269548fa27e0089a8b8278fc4fc781d7f65a939b version=v1.4.3
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.314743500Z" level=debug msg="changing OOM score to -500"
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.336716900Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.336891100Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338482500Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: can't change directory to '4.19.128-microsoft-standard': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338523700Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1
2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338835400Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1

2021-03-05T17:58:29Z kmsg (977696) - 2021-03-05T17:58:28.2836488Z: init: (141) ERROR: StartHostListener:356: write failed 32
2021-03-05T17:58:30Z kmsg (977697) - 2021-03-05T17:58:29.2863708Z: init: (141) ERROR: StartHostListener:356: write failed 32
2021-03-05T17:58:31Z kmsg (977698) - 2021-03-05T17:58:30.2888998Z: init: (141) ERROR: StartHostListener:356: write failed 32
2021-03-05T17:58:32Z kmsg (977699) - 2021-03-05T17:58:31.2917718Z: init: (141) ERROR: StartHostListener:356: write failed 32
2021-03-05T17:58:33Z kmsg (977700) - 2021-03-05T17:58:32.2944488Z: init: (141) ERROR: StartHostListener:356: write failed 32
2021-03-05T17:58:34Z kmsg (977701) - 2021-03-05T17:58:33.2979438Z: init: (141) ERROR: StartHostListener:356: write failed 32

time="2021-01-12T14:38:11+01:00" level=info msg="🍀 socket server listening : \\\\.\\pipe\\dockerGuiToDriver"
time="2021-01-12T14:38:13+01:00" level=info msg="NewSharer: WSL2 engine is enabled so no file sharer is required."
time="2021-01-12T14:38:13+01:00" level=info msg=waitForDockerUp
time="2021-01-12T14:38:13+01:00" level=info msg="🍀 socket server starting : \\\\.\\pipe\\dockerGuiToDriver"

----------------------------------------------------

[
["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.314696100Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"starting containerd\""],
" revision",
["operator", "="],
["number", "269548fa27e0089a8b8278fc4fc781d7f65a939b"],
" version",
["operator", "="],
["number", "v1.4.3"],

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.314743500Z\""],
" level",
["operator", "="],
"debug msg",
["operator", "="],
["string", "\"changing OOM score to -500\""],

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.336716900Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"loading plugin \\\"io.containerd.content.v1.content\\\"...\""],
" type",
["operator", "="],
"io",
["punctuation", "."],
"containerd",
["punctuation", "."],
"content",
["punctuation", "."],
"v1\r\n",

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.336891100Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"loading plugin \\\"io.containerd.snapshotter.v1.aufs\\\"...\""],
" type",
["operator", "="],
"io",
["punctuation", "."],
"containerd",
["punctuation", "."],
"snapshotter",
["punctuation", "."],
"v1\r\n",

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.338482500Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"skip loading plugin \\\"io.containerd.snapshotter.v1.aufs\\\"...\""],
" error",
["operator", "="],
["string", "\"aufs is not supported (modprobe aufs failed: exit status 1 \\\"modprobe: can't change directory to '4.19.128-microsoft-standard': No such file or directory\\\\n\\\"): skip plugin\""],
" type",
["operator", "="],
"io",
["punctuation", "."],
"containerd",
["punctuation", "."],
"snapshotter",
["punctuation", "."],
"v1\r\n",

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.338523700Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"loading plugin \\\"io.containerd.snapshotter.v1.btrfs\\\"...\""],
" type",
["operator", "="],
"io",
["punctuation", "."],
"containerd",
["punctuation", "."],
"snapshotter",
["punctuation", "."],
"v1\r\n",

["date", "2021-01-12T"],
["time", "13:38:16Z"],
" containerd time",
["operator", "="],
["string", "\"2021-01-12T13:38:16.338835400Z\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"skip loading plugin \\\"io.containerd.snapshotter.v1.btrfs\\\"...\""],
" error",
["operator", "="],
["string", "\"path /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin\""],
" type",
["operator", "="],
"io",
["punctuation", "."],
"containerd",
["punctuation", "."],
"snapshotter",
["punctuation", "."],
"v1\r\n\r\n",

["date", "2021-03-05T"],
["time", "17:58:29Z"],
" kmsg ",
["operator", "("],
["number", "977696"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:28.2836488Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

["date", "2021-03-05T"],
["time", "17:58:30Z"],
" kmsg ",
["operator", "("],
["number", "977697"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:29.2863708Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

["date", "2021-03-05T"],
["time", "17:58:31Z"],
" kmsg ",
["operator", "("],
["number", "977698"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:30.2888998Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

["date", "2021-03-05T"],
["time", "17:58:32Z"],
" kmsg ",
["operator", "("],
["number", "977699"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:31.2917718Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

["date", "2021-03-05T"],
["time", "17:58:33Z"],
" kmsg ",
["operator", "("],
["number", "977700"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:32.2944488Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

["date", "2021-03-05T"],
["time", "17:58:34Z"],
" kmsg ",
["operator", "("],
["number", "977701"],
["operator", ")"],
["operator", "-"],
["date", "2021-03-05T"],
["time", "17:58:33.2979438Z"],
["operator", ":"],
" init",
["operator", ":"],
["operator", "("],
["number", "141"],
["operator", ")"],
["level", "ERROR"],
["operator", ":"],
" StartHostListener",
["operator", ":"],
["number", "356"],
["operator", ":"],
" write failed ",
["number", "32"],

"\r\n\r\ntime",
["operator", "="],
["string", "\"2021-01-12T14:38:11+01:00\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"🍀 socket server listening : \\\\\\\\.\\\\pipe\\\\dockerGuiToDriver\""],

"\r\ntime",
["operator", "="],
["string", "\"2021-01-12T14:38:13+01:00\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"NewSharer: WSL2 engine is enabled so no file sharer is required.\""],

"\r\ntime",
["operator", "="],
["string", "\"2021-01-12T14:38:13+01:00\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
"waitForDockerUp\r\ntime",
["operator", "="],
["string", "\"2021-01-12T14:38:13+01:00\""],
" level",
["operator", "="],
"info msg",
["operator", "="],
["string", "\"🍀 socket server starting : \\\\\\\\.\\\\pipe\\\\dockerGuiToDriver\""]
]
762 changes: 762 additions & 0 deletions tests/languages/log/_java_stack_trace.test

Large diffs are not rendered by default.

419 changes: 419 additions & 0 deletions tests/languages/log/_minecraft.test

Large diffs are not rendered by default.

141 changes: 141 additions & 0 deletions tests/languages/log/_nginx.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
47.29.201.179 - - [28/Feb/2019:13:17:10 +0000] "GET /?p=1 HTTP/2.0" 200 5316 "https://domain1.com/?p=1" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" "2.75"

Mar 19 22:10:18 xxxxxx journal: xxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:18 +0000] "GET / HTTP/1.1" 200 1863 "-" "curl/7.29.0" "-"
Mar 19 22:10:24 xxxxxxx journal: xxxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:24 +0000] "GET / HTTP/1.1" 200 53324 "-" "curl/7.29.0" "-"

TLSv1.2 AES128-SHA 1.1.1.1 "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 3.3.3.3 "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 4.4.4.4 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
TLSv1 AES128-SHA 5.5.5.5 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 6.6.6.6 "Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36"

----------------------------------------------------

[
["ip-address", "47.29.201.179"],
["separator", "- - "],
["punctuation", "["],
["date", "28/Feb/2019"],
["operator", ":"],
["time", "13:17:10 +0000"],
["punctuation", "]"],
["string", "\"GET /?p=1 HTTP/2.0\""],
["number", "200"],
["number", "5316"],
["string", "\"https://domain1.com/?p=1\""],
["string", "\"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36\""],
["string", "\"2.75\""],

["date", "Mar 19"],
["time", "22:10:18"],
" xxxxxx journal",
["operator", ":"],
["domain", "xxxxxxx.mylabserver.com"],
" nginx",
["operator", ":"],
["domain", "photos.example.com"],
["ip-address", "127.0.0.1"],
["separator", "- - "],
["punctuation", "["],
["date", "19/Mar/2018"],
["operator", ":"],
["time", "22:10:18 +0000"],
["punctuation", "]"],
["string", "\"GET / HTTP/1.1\""],
["number", "200"],
["number", "1863"],
["string", "\"-\""],
["string", "\"curl/7.29.0\""],
["string", "\"-\""],

["date", "Mar 19"],
["time", "22:10:24"],
" xxxxxxx journal",
["operator", ":"],
["domain", "xxxxxxxx.mylabserver.com"],
" nginx",
["operator", ":"],
["domain", "photos.example.com"],
["ip-address", "127.0.0.1"],
["separator", "- - "],
["punctuation", "["],
["date", "19/Mar/2018"],
["operator", ":"],
["time", "22:10:24 +0000"],
["punctuation", "]"],
["string", "\"GET / HTTP/1.1\""],
["number", "200"],
["number", "53324"],
["string", "\"-\""],
["string", "\"curl/7.29.0\""],
["string", "\"-\""],

"\r\n\r\nTLSv1",
["punctuation", "."],
"2 AES128",
["operator", "-"],
"SHA ",
["ip-address", "1.1.1.1"],
["string", "\"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0\""],

"\r\nTLSv1",
["punctuation", "."],
"2 ECDHE",
["operator", "-"],
"RSA",
["operator", "-"],
"AES128",
["operator", "-"],
"GCM",
["operator", "-"],
"SHA256 ",
["ip-address", "2.2.2.2"],
["string", "\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\""],

"\r\nTLSv1",
["punctuation", "."],
"2 ECDHE",
["operator", "-"],
"RSA",
["operator", "-"],
"AES128",
["operator", "-"],
"GCM",
["operator", "-"],
"SHA256 ",
["ip-address", "3.3.3.3"],
["string", "\"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0\""],

"\r\nTLSv1",
["punctuation", "."],
"2 ECDHE",
["operator", "-"],
"RSA",
["operator", "-"],
"AES128",
["operator", "-"],
"GCM",
["operator", "-"],
"SHA256 ",
["ip-address", "4.4.4.4"],
["string", "\"Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0\""],

"\r\nTLSv1 AES128",
["operator", "-"],
"SHA ",
["ip-address", "5.5.5.5"],
["string", "\"Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0\""],

"\r\nTLSv1",
["punctuation", "."],
"2 ECDHE",
["operator", "-"],
"RSA",
["operator", "-"],
"CHACHA20",
["operator", "-"],
"POLY1305 ",
["ip-address", "6.6.6.6"],
["string", "\"Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36\""]
]
83 changes: 83 additions & 0 deletions tests/languages/log/_npm_console.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/asdasvsdffafwedsfvfasdfkigpodkfphd - Not found
npm ERR! 404
npm ERR! 404 'asdasvsdffafwedsfvfasdfkigpodkfphd@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\micha\AppData\Roaming\npm-cache\_logs\2021-03-08T19_15_44_229Z-debug.log

----------------------------------------------------

[
"npm ",
["level", "ERR"],
["operator", "!"],
" code E404\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],
" Not Found ",
["operator", "-"],
" GET ",
["url", "https://registry.npmjs.org/asdasvsdffafwedsfvfasdfkigpodkfphd"],
["operator", "-"],
" Not found\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],

"\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],
["string", "'asdasvsdffafwedsfvfasdfkigpodkfphd@latest'"],
" is not in the npm registry",
["punctuation", "."],

"\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],
" You should bug the author to publish it ",
["operator", "("],
"or use the name yourself",
["operator", "!"],
["operator", ")"],

"\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],

"\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],
" Note that you can also install from a\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["number", "404"],
" tarball",
["punctuation", ","],
" folder",
["punctuation", ","],
" http url",
["punctuation", ","],
" or git url",
["punctuation", "."],

"\r\n\r\nnpm ",
["level", "ERR"],
["operator", "!"],
" A complete log of this run can be found in",
["operator", ":"],

"\r\nnpm ",
["level", "ERR"],
["operator", "!"],
["file-path", "C:\\Users\\micha\\AppData\\Roaming\\npm-cache\\_logs\\2021-03-08T19_15_44_229Z-debug.log"]
]
401 changes: 401 additions & 0 deletions tests/languages/log/_npm_log.test

Large diffs are not rendered by default.

523 changes: 523 additions & 0 deletions tests/languages/log/_table.test

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions tests/languages/log/_tomcat.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
23-Jan-2020 16:05:51.597 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
23-Jan-2020 16:05:51.598 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: init: Global resources are available
23-Jan-2020 16:05:51.606 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost'
23-Jan-2020 16:06:11.673 INFO [http-nio-8080-exec-8] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost'
21-Nov-2017 11:15:34.986 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08046 Found camunda bpm platform configuration in CATALINA_BASE/CATALINA_HOME conf directory [C:\asdasd.xml] at 'file:/C:/asdasd.xml'
21-Nov-2017 11:15:35.310 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-12003 Plugin 'ProcessApplicationEventListenerPlugin' activated on process engine 'default'
21-Nov-2017 11:15:35.319 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-12003 Plugin 'SpinProcessEnginePlugin' activated on process engine 'default'

----------------------------------------------------

[
["date", "23-Jan-2020"],
["time", "16:05:51.597"],
["level", "INFO"],
["punctuation", "["],
"http",
["operator", "-"],
"nio",
["operator", "-"],
["number", "8080"],
["operator", "-"],
"exec",
["operator", "-"],
["number", "9"],
["punctuation", "]"],
["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"],
["property", "init:"],
" Associated with Deployer ",
["string", "'Catalina:type=Deployer,host=localhost'"],

["date", "23-Jan-2020"],
["time", "16:05:51.598"],
["level", "INFO"],
["punctuation", "["],
"http",
["operator", "-"],
"nio",
["operator", "-"],
["number", "8080"],
["operator", "-"],
"exec",
["operator", "-"],
["number", "9"],
["punctuation", "]"],
["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"],
["property", "init:"],
" Global resources are available\r\n",

["date", "23-Jan-2020"],
["time", "16:05:51.606"],
["level", "INFO"],
["punctuation", "["],
"http",
["operator", "-"],
"nio",
["operator", "-"],
["number", "8080"],
["operator", "-"],
"exec",
["operator", "-"],
["number", "9"],
["punctuation", "]"],
["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"],
["property", "list:"],
" Listing contexts for virtual host ",
["string", "'localhost'"],

["date", "23-Jan-2020"],
["time", "16:06:11.673"],
["level", "INFO"],
["punctuation", "["],
"http",
["operator", "-"],
"nio",
["operator", "-"],
["number", "8080"],
["operator", "-"],
"exec",
["operator", "-"],
["number", "8"],
["punctuation", "]"],
["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"],
["property", "list:"],
" Listing contexts for virtual host ",
["string", "'localhost'"],

["date", "21-Nov-2017"],
["time", "11:15:34.986"],
["level", "INFO"],
["punctuation", "["],
"main",
["punctuation", "]"],
" org",
["punctuation", "."],
"camunda",
["punctuation", "."],
"commons",
["punctuation", "."],
"logging",
["punctuation", "."],
"BaseLogger",
["punctuation", "."],
"logInfo ENGINE",
["operator", "-"],
["number", "08046"],
" Found camunda bpm platform configuration in CATALINA_BASE",
["operator", "/"],
"CATALINA_HOME conf directory ",
["punctuation", "["],
["file-path", "C:\\asdasd.xml"],
["punctuation", "]"],
" at ",
["string", "'file:/C:/asdasd.xml'"],

["date", "21-Nov-2017"],
["time", "11:15:35.310"],
["level", "INFO"],
["punctuation", "["],
"main",
["punctuation", "]"],
" org",
["punctuation", "."],
"camunda",
["punctuation", "."],
"commons",
["punctuation", "."],
"logging",
["punctuation", "."],
"BaseLogger",
["punctuation", "."],
"logInfo ENGINE",
["operator", "-"],
["number", "12003"],
" Plugin ",
["string", "'ProcessApplicationEventListenerPlugin'"],
" activated on process engine ",
["string", "'default'"],

["date", "21-Nov-2017"],
["time", "11:15:35.319"],
["level", "INFO"],
["punctuation", "["],
"main",
["punctuation", "]"],
" org",
["punctuation", "."],
"camunda",
["punctuation", "."],
"commons",
["punctuation", "."],
"logging",
["punctuation", "."],
"BaseLogger",
["punctuation", "."],
"logInfo ENGINE",
["operator", "-"],
["number", "12003"],
" Plugin ",
["string", "'SpinProcessEnginePlugin'"],
" activated on process engine ",
["string", "'default'"]
]
278 changes: 278 additions & 0 deletions tests/languages/log/_windows.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSWZRD.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSWZRD.DLL, 0xc000003a
4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSTIFF.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSTIFF.DLL, 0xc000003a
4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSRES.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSRES.DLL, 0xc000003a
4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSAPI.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSAPI.DLL, 0xc000003a

AudMig: Device Ids match - {5}.\?hdaudio#func_03&ven_40de&dev_0083&subsys_50de130f&rev_4003#1&13efefe3&0&0004#{6993ad03-95ef-33d0-a2cc-00a0c9322596} opo04/00040002 {2}.\?hdaudio#func_01&ven_40de&dev_0084&subsys_10de310f&rev_1004#2&22efefe2&0&0004#{6994ad04-94ef-32d0-a1cc-00a0c9181396} opo04/00030001
AudMig: Migrated {a31c434e-df4c-1efd-8010-67d416a840e0},2 property at 3
AudMig: Migrated {9627b1b9-13ee-5c33-b54c-7b3555c991cc},4 property at 7
AudMig: Migrated {339abffc-30a7-47ce-af08-68c9a7d74466},22 property at 14
AudMig: Migrating role and device state from SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender{8B3B1D07-43C4-2BB5-B0ED-DCD49D5F3BCC} to SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender{C4B8172F-B522-160B-A3A9-180AC778147E}
AudMig: Device Ids match - {5}.\?hdaudio#func_01&ven_40de&dev_0081&subsys_20de310f&rev_2004#2&22efefe1&0&0005#{6993ad02-93ef-31d0-a5cc-00a0c9354396} opo05/00020000 {2}.\?hdaudio#func_03&ven_30de&dev_0081&subsys_30de240f&rev_4002#2&34efefe4&0&0003#{6991ad01-95ef-34d0-a1cc-00a0c9543296} opo03/00050000
AudMig: Migrated {a51c424e-df5c-4efd-8020-67d126a820e0},1 property at 5

----------------------------------------------------

[
["date", "4/1/2020"],
["time", "14:15:27"],
["operator", "-"],
" PFRO Error",
["operator", ":"],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSWZRD.DLL"],
["punctuation", ","],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSWZRD.DLL"],
["punctuation", ","],
["number", "0xc000003a"],

["date", "4/1/2020"],
["time", "14:15:27"],
["operator", "-"],
" PFRO Error",
["operator", ":"],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSTIFF.DLL"],
["punctuation", ","],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSTIFF.DLL"],
["punctuation", ","],
["number", "0xc000003a"],

["date", "4/1/2020"],
["time", "14:15:27"],
["operator", "-"],
" PFRO Error",
["operator", ":"],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSRES.DLL"],
["punctuation", ","],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSRES.DLL"],
["punctuation", ","],
["number", "0xc000003a"],

["date", "4/1/2020"],
["time", "14:15:27"],
["operator", "-"],
" PFRO Error",
["operator", ":"],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSAPI.DLL"],
["punctuation", ","],
" \\",
["operator", "?"],
["operator", "?"],
"\\",
["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSAPI.DLL"],
["punctuation", ","],
["number", "0xc000003a"],

["property", "AudMig:"],
" Device Ids match ",
["operator", "-"],
["operator", "{"],
["number", "5"],
["operator", "}"],
["punctuation", "."],
"\\",
["operator", "?"],
"hdaudio",
["operator", "#"],
"func_03",
["operator", "&"],
"ven_40de",
["operator", "&"],
"dev_0083",
["operator", "&"],
"subsys_50de130f",
["operator", "&"],
"rev_4003",
["operator", "#"],
["number", "1"],
["operator", "&"],
["number", "13efefe3"],
["operator", "&"],
["number", "0"],
["operator", "&"],
["number", "0004"],
["operator", "#"],
["operator", "{"],
["uuid", "6993ad03-95ef-33d0-a2cc-00a0c9322596"],
["operator", "}"],
" opo04",
["operator", "/"],
["number", "00040002"],
["operator", "{"],
["number", "2"],
["operator", "}"],
["punctuation", "."],
"\\",
["operator", "?"],
"hdaudio",
["operator", "#"],
"func_01",
["operator", "&"],
"ven_40de",
["operator", "&"],
"dev_0084",
["operator", "&"],
"subsys_10de310f",
["operator", "&"],
"rev_1004",
["operator", "#"],
["number", "2"],
["operator", "&"],
["number", "22efefe2"],
["operator", "&"],
["number", "0"],
["operator", "&"],
["number", "0004"],
["operator", "#"],
["operator", "{"],
["uuid", "6994ad04-94ef-32d0-a1cc-00a0c9181396"],
["operator", "}"],
" opo04",
["operator", "/"],
["number", "00030001"],

["property", "AudMig:"],
" Migrated ",
["operator", "{"],
["uuid", "a31c434e-df4c-1efd-8010-67d416a840e0"],
["operator", "}"],
["punctuation", ","],
["number", "2"],
" property at ",
["number", "3"],

["property", "AudMig:"],
" Migrated ",
["operator", "{"],
["uuid", "9627b1b9-13ee-5c33-b54c-7b3555c991cc"],
["operator", "}"],
["punctuation", ","],
["number", "4"],
" property at ",
["number", "7"],

["property", "AudMig:"],
" Migrated ",
["operator", "{"],
["uuid", "339abffc-30a7-47ce-af08-68c9a7d74466"],
["operator", "}"],
["punctuation", ","],
["number", "22"],
" property at ",
["number", "14"],

["property", "AudMig:"],
" Migrating role and device state from SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender",
["operator", "{"],
["uuid", "8B3B1D07-43C4-2BB5-B0ED-DCD49D5F3BCC"],
["operator", "}"],
" to SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender",
["operator", "{"],
["uuid", "C4B8172F-B522-160B-A3A9-180AC778147E"],
["operator", "}"],

["property", "AudMig:"],
" Device Ids match ",
["operator", "-"],
["operator", "{"],
["number", "5"],
["operator", "}"],
["punctuation", "."],
"\\",
["operator", "?"],
"hdaudio",
["operator", "#"],
"func_01",
["operator", "&"],
"ven_40de",
["operator", "&"],
"dev_0081",
["operator", "&"],
"subsys_20de310f",
["operator", "&"],
"rev_2004",
["operator", "#"],
["number", "2"],
["operator", "&"],
["number", "22efefe1"],
["operator", "&"],
["number", "0"],
["operator", "&"],
["number", "0005"],
["operator", "#"],
["operator", "{"],
["uuid", "6993ad02-93ef-31d0-a5cc-00a0c9354396"],
["operator", "}"],
" opo05",
["operator", "/"],
["number", "00020000"],
["operator", "{"],
["number", "2"],
["operator", "}"],
["punctuation", "."],
"\\",
["operator", "?"],
"hdaudio",
["operator", "#"],
"func_03",
["operator", "&"],
"ven_30de",
["operator", "&"],
"dev_0081",
["operator", "&"],
"subsys_30de240f",
["operator", "&"],
"rev_4002",
["operator", "#"],
["number", "2"],
["operator", "&"],
["number", "34efefe4"],
["operator", "&"],
["number", "0"],
["operator", "&"],
["number", "0003"],
["operator", "#"],
["operator", "{"],
["uuid", "6991ad01-95ef-34d0-a1cc-00a0c9543296"],
["operator", "}"],
" opo03",
["operator", "/"],
["number", "00050000"],

["property", "AudMig:"],
" Migrated ",
["operator", "{"],
["uuid", "a51c424e-df5c-4efd-8020-67d126a820e0"],
["operator", "}"],
["punctuation", ","],
["number", "1"],
" property at ",
["number", "5"]
]
27 changes: 27 additions & 0 deletions tests/languages/log/date_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
2020-03-11
28/Jul/1995
2017-05-11
Mar 2
Apr 26
Sun Mar 2
23 SEP 2013
1/26/2021
4/1/2020

2020-03-23T04:21:20Z

----------------------------------------------------

[
["date", "2020-03-11"],
["date", "28/Jul/1995"],
["date", "2017-05-11"],
["date", "Mar 2"],
["date", "Apr 26"],
["date", "Sun Mar 2"],
["date", "23 SEP 2013"],
["date", "1/26/2021"],
["date", "4/1/2020"],

["date", "2020-03-23T"], ["time", "04:21:20Z"]
]
9 changes: 9 additions & 0 deletions tests/languages/log/hash_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
A3DCB4D229DE6FDE0DB5686DEE47145D
0c5259c3dd0a7c46f4835221645f62a0638c9b9faa02af08676e8069e1ff964b

----------------------------------------------------

[
["hash", "A3DCB4D229DE6FDE0DB5686DEE47145D"],
["hash", "0c5259c3dd0a7c46f4835221645f62a0638c9b9faa02af08676e8069e1ff964b"]
]
57 changes: 57 additions & 0 deletions tests/languages/log/level_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
ALERT
CRIT
CRITICAL
EMERG
EMERGENCY
ERR
ERROR
FAILURE
FATAL
SEVERE

WARN
WARNING

DISPLAY
INFO
NOTICE
STATUS

DEBUG
FINE

FINER
FINEST
TRACE
VERBOSE

----------------------------------------------------

[
["level", "ALERT"],
["level", "CRIT"],
["level", "CRITICAL"],
["level", "EMERG"],
["level", "EMERGENCY"],
["level", "ERR"],
["level", "ERROR"],
["level", "FAILURE"],
["level", "FATAL"],
["level", "SEVERE"],

["level", "WARN"],
["level", "WARNING"],

["level", "DISPLAY"],
["level", "INFO"],
["level", "NOTICE"],
["level", "STATUS"],

["level", "DEBUG"],
["level", "FINE"],

["level", "FINER"],
["level", "FINEST"],
["level", "TRACE"],
["level", "VERBOSE"]
]
41 changes: 41 additions & 0 deletions tests/languages/log/number_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
123
213.456
0000000014A9A320

0xff
0x3000
0b01010
0o777

1.2
v1.2
v1.2.3

32ms
3.70GHz
0.000000s
59.951Hz
1TB

----------------------------------------------------

[
["number", "123"],
["number", "213.456"],
["number", "0000000014A9A320"],

["number", "0xff"],
["number", "0x3000"],
["number", "0b01010"],
["number", "0o777"],

["number", "1.2"],
["number", "v1.2"],
["number", "v1.2.3"],

["number", "32ms"],
["number", "3.70GHz"],
["number", "0.000000s"],
["number", "59.951Hz"],
["number", "1TB"]
]
34 changes: 34 additions & 0 deletions tests/languages/log/path_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
c:/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg
C:\stuff\workspace\quickpoll\quickpollEJB\pom.xml
C:\WINDOWS\system32\DRIVERS\storahci.sys

/USR/SBIN/CRON
/etc/ppp/ip-down

/usr/share/doc/tama/examples/tama-nanny.exp 2>/dev/null >/dev/null

/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14

----------------------------------------------------

[
["file-path", "c:/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg"],
["file-path", "C:\\stuff\\workspace\\quickpoll\\quickpollEJB\\pom.xml"],
["file-path", "C:\\WINDOWS\\system32\\DRIVERS\\storahci.sys"],

["file-path", "/USR/SBIN/CRON"],
["file-path", "/etc/ppp/ip-down"],

["file-path", "/usr/share/doc/tama/examples/tama-nanny.exp"],
["number", "2"],
["operator", ">"],
["file-path", "/dev/null"],
["operator", ">"],
["file-path", "/dev/null"],

["file-path", "/usr/local/lib/node_modules/npm/lib/utils/spawn.js"],
["operator", ":"],
["number", "24"],
["operator", ":"],
["number", "14"]
]
100 changes: 100 additions & 0 deletions tests/languages/log/property_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[1119/000645.591:ERROR:process_info.cc(329)] VirtualQueryEx: Zugriff verweigert (0x5)

Video:
Renderer: Vulkan
Resolution: 1280x720
Aspect ratio: 16:9
Frame limit: Auto
Vulkan:
Adapter: GeForce GTX 1080 Ti
Force FIFO present mode: false
Force primitive restart flag: false
Force Disable Exclusive Fullscreen Mode: false
Performance Overlay:
Enabled: false
Enable Framerate Graph: false
Enable Frametime Graph: false
Detail level: Medium
Metrics update interval (ms): 350
Font size (px): 10
Body Color (hex): "#FFE138FF"
Body Background (hex): "#002339FF"
Title Color (hex): "#F26C24FF"
Title Background (hex): "#00000000"
Shader Compilation Hint:
Position X (px): 20
Position Y (px): 690

[2020-06-11 16:12:02.642] [DISPLAY] [Main ] [main] Build type: FMB

Min/Max Sample Rate: 100, 200000

----------------------------------------------------

[
["punctuation", "["],
["number", "1119"],
["operator", "/"],
["number", "000645.591"],
["operator", ":"],
["level", "ERROR"],
["operator", ":"],
"process_info",
["punctuation", "."],
"cc",
["operator", "("],
["number", "329"],
["operator", ")"],
["punctuation", "]"],
["property", "VirtualQueryEx:"],
" Zugriff verweigert ",
["operator", "("],
["number", "0x5"],
["operator", ")"],

["property", "Video:"],
["property", "Renderer:"], " Vulkan\r\n ",
["property", "Resolution:"], " 1280x720\r\n ",
["property", "Aspect ratio:"], ["number", "16"], ["operator", ":"], ["number", "9"],
["property", "Frame limit:"], " Auto\r\n ",
["property", "Vulkan:"],
["property", "Adapter:"], " GeForce GTX ", ["number", "1080"], " Ti\r\n ",
["property", "Force FIFO present mode:"], ["boolean", "false"],
["property", "Force primitive restart flag:"], ["boolean", "false"],
["property", "Force Disable Exclusive Fullscreen Mode:"], ["boolean", "false"],
["property", "Performance Overlay:"],
["property", "Enabled:"], ["boolean", "false"],
["property", "Enable Framerate Graph:"], ["boolean", "false"],
["property", "Enable Frametime Graph:"], ["boolean", "false"],
["property", "Detail level:"], " Medium\r\n ",
["property", "Metrics update interval (ms):"], ["number", "350"],
["property", "Font size (px):"], ["number", "10"],
["property", "Body Color (hex):"], ["string", "\"#FFE138FF\""],
["property", "Body Background (hex):"], ["string", "\"#002339FF\""],
["property", "Title Color (hex):"], ["string", "\"#F26C24FF\""],
["property", "Title Background (hex):"], ["string", "\"#00000000\""],
["property", "Shader Compilation Hint:"],
["property", "Position X (px):"], ["number", "20"],
["property", "Position Y (px):"], ["number", "690"],

["punctuation", "["],
["date", "2020-06-11"],
["time", "16:12:02.642"],
["punctuation", "]"],
["punctuation", "["],
["level", "DISPLAY"],
["punctuation", "]"],
["punctuation", "["],
"Main ",
["punctuation", "]"],
["punctuation", "["],
"main",
["punctuation", "]"],
["property", "Build type:"],
" FMB\r\n\r\n",

["property", "Min/Max Sample Rate:"],
["number", "100"],
["punctuation", ","],
["number", "200000"]
]
50 changes: 50 additions & 0 deletions tests/languages/log/separator_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-----

sysadm.bda.nasa.gov - - [28/Jul/1995:13:30:20 -0400] "GET /elv/endba11.gif HTTP/1.0" 200 306

2017-05-11 15:05:28.889 INFO 30284 --- [ost-staItStop-1] o.s.web.context.ContextLoadeI : Root WebApplicationContext: initialization completed in 911 ms

----------------------------------------------------

[
["separator", "-----"],

["domain", "sysadm.bda.nasa.gov"],
["separator", "- - "],
["punctuation", "["],
["date", "28/Jul/1995"],
["operator", ":"],
["time", "13:30:20 -0400"],
["punctuation", "]"],
["string", "\"GET /elv/endba11.gif HTTP/1.0\""],
["number", "200"],
["number", "306"],

["date", "2017-05-11"],
["time", "15:05:28.889"],
["level", "INFO"],
["number", "30284"],
["separator", "---"],
["punctuation", "["],
"ost",
["operator", "-"],
"staItStop",
["operator", "-"],
["number", "1"],
["punctuation", "]"],
" o",
["punctuation", "."],
"s",
["punctuation", "."],
"web",
["punctuation", "."],
"context",
["punctuation", "."],
"ContextLoadeI ",
["operator", ":"],
" Root WebApplicationContext",
["operator", ":"],
" initialization completed in ",
["number", "911"],
" ms"
]
39 changes: 39 additions & 0 deletions tests/languages/log/string_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"GET /history/apollo/images/apollo-log01.gif HTTP/1.0"
"{[/],methods=[GET]}"

TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"

13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"

This isn't a string but this is: 'string'

----------------------------------------------------

[
["string", "\"GET /history/apollo/images/apollo-log01.gif HTTP/1.0\""],
["string", "\"{[/],methods=[GET]}\""],

"\r\n\r\nTLSv1",
["punctuation", "."],
"2 ECDHE",
["operator", "-"],
"RSA",
["operator", "-"],
"AES128",
["operator", "-"],
"GCM",
["operator", "-"],
"SHA256 ",
["ip-address", "2.2.2.2"],
["string", "\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\""],

["number", "13"],
" error argv ",
["string", "\"/usr/local/bin/node\""],
["string", "\"/usr/local/bin/npm\""],
["string", "\"start\""],

"\r\n\r\nThis isn't a string but this is",
["operator", ":"],
["string", "'string'"]
]
25 changes: 25 additions & 0 deletions tests/languages/log/time_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
9:52:58
15:05:28.889
19:38:12,729
00:29:13:038
13:30:12

13:30:19 -0400
13:30:15 +9400

2020-03-23T04:21:20Z

----------------------------------------------------

[
["time", "9:52:58"],
["time", "15:05:28.889"],
["time", "19:38:12,729"],
["time", "00:29:13:038"],
["time", "13:30:12"],

["time", "13:30:19 -0400"],
["time", "13:30:15 +9400"],

["date", "2020-03-23T"], ["time", "04:21:20Z"]
]
30 changes: 30 additions & 0 deletions tests/languages/log/url_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
http://66.140.25.157:802/
file://c:/repository

Foo <https://foo.bar/contact.html>

- Mapping virtual host: http://download.spinetix.com/spxjslibs

Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is

----------------------------------------------------

[
["url", "http://66.140.25.157:802/"],
["url", "file://c:/repository"],

"\r\n\r\nFoo ",
["operator", "<"],
["url", "https://foo.bar/contact.html"],
["operator", ">"],

["operator", "-"],
" Mapping virtual host",
["operator", ":"],
["url", "http://download.spinetix.com/spxjslibs"],

["property", "Failed to transfer file:"],
["url", "http://repo.xxxx.com/foo/bar.pom"],
["punctuation", "."],
" Return code is"
]
9 changes: 9 additions & 0 deletions tests/languages/log/uuid_feature.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
86695F12-340E-4F04-9FD3-9253DD327460
F9F19DA5-3B09-4B2F-9D89-C64753E3EAAB

----------------------------------------------------

[
["uuid", "86695F12-340E-4F04-9FD3-9253DD327460"],
["uuid", "F9F19DA5-3B09-4B2F-9D89-C64753E3EAAB"]
]

0 comments on commit 2bc6475

Please sign in to comment.