diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a5f15b221..859ecb519 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -660,7 +660,30 @@ "id": "run", "color": "terminal.ansiGreen", }, - } + }, + { + "label": "View DataStreamQueryAnalyzer Logs (Last Run)", + "type": "process", + "command": "", + "windows": { + "command": "tools/logging/show_last_run.cmd", + "args": [ + "DataStream", + "DataStreamQueryAnalyzer.exe", + "'Starting DataStreamQueryAnalyzer'" + ] + }, + "presentation": { + "reveal": "always", + "focus": true, + "panel": "shared", + "showReuseMessage": false, + "close": true, + }, + "icon": { + "id": "wrench" + }, + }, ], "inputs": [ { diff --git a/tools/logging/show_last_run.cmd b/tools/logging/show_last_run.cmd new file mode 100644 index 000000000..e7c8ec1e2 --- /dev/null +++ b/tools/logging/show_last_run.cmd @@ -0,0 +1,6 @@ +@echo off + +set log_dir="%APPDATA%/bts/%1/data/logging.%2" +set num_lines=9999 + +tac "%log_dir%/log" | grep "%3" -m 1 -B %num_lines% | tac | less