-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpen_Logs.cmd
More file actions
42 lines (36 loc) · 1018 Bytes
/
Open_Logs.cmd
File metadata and controls
42 lines (36 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
setlocal
echo ===============================================
echo AutoFire - Open Crash Logs
echo ===============================================
set userlog=%USERPROFILE%\AutoFire\logs\last_crash.txt
set exelog=
if exist ".\dist\AutoFire\logs\last_crash.txt" set exelog=.\dist\AutoFire\logs\last_crash.txt
if "%exelog%"=="" (
for /f "delims=" %%F in ('dir /ad /o:-d /b ".\dist" ^| findstr /r "^AutoFire_[0-9]"') do (
if exist ".\dist\%%F\AutoFire\logs\last_crash.txt" (
set exelog=.\dist\%%F\AutoFire\logs\last_crash.txt
goto :found
)
)
)
:found
if exist "%userlog%" (
echo Opening: %userlog%
start notepad "%userlog%"
) else (
echo No user log at %userlog%
)
if not "%exelog%"=="" (
if exist "%exelog%" (
echo Opening: %exelog%
start notepad "%exelog%"
) else (
echo No EXE-side log found at %exelog%
)
) else (
echo No EXE-side log path detected.
)
echo.
echo If no logs opened, either the app did not crash or the logging patch is missing.
pause