|
Senior Member
|
03-28-2015
, 19:08
Re: [Any] Classy Crash Logger
|
#91
|
Quote:
Originally Posted by friagram
nonclassy crash logger:
PHP Code:
For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do ( Set DayW=%%A Set Day=%%B Set Month=%%C Set Year=%%D Set "All=%%A (%%B-%%C)" ) For /F "tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do ( set /a "Hour=100%%A%%100" set Min=%%B set Sec=%%C ) if %Hour% geq 12 ( set AMPM=PM set /a "Hour-=12" ) else set "AMPM=AM" if %Hour% equ 0 set "Hour=12" if %Hour% lss 10 set "Hour=0%Hour%" set "Allm=%Hour%.%Min%.%Sec% %AMPM%"
ECHO %All% %Allm% srcds started >> crashlog.txt type crashlog.txt
<stuff>
For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do ( Set DayW=%%A Set Day=%%B Set Month=%%C Set Year=%%D Set "All=%%A (%%B-%%C)" ) For /F "tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do ( set /a "Hour=100%%A%%100" set Min=%%B set Sec=%%C ) if %Hour% geq 12 ( set AMPM=PM set /a "Hour-=12" ) else set "AMPM=AM" if %Hour% equ 0 set "Hour=12" if %Hour% lss 10 set "Hour=0%Hour%" set "Allm=%Hour%.%Min%.%Sec% %AMPM%"
ECHO %All% %Allm% WARNING: srcds crashed, restarting >> crashlog.txt
rsync to web...
profit?
oh right, and if you have another daemon monitoring the server updates//hangs (you should)
PHP Code:
copypastedatecodefromabove
ECHO %All% %Allm% Server Terminated - Was Not Responsive >> "path\to\crashlog.txt"
and in your steamcmd update file
ECHO %All% %Allm% Server Updated >> "path\to\crashlog.txt"
|
And how do i use this?
Any chance to make this plugin log to file rather than webpage?
|
|
|
|