Raised This Month: $12 Target: $400
 3% 

[Any] Classy Crash Logger


Post New Thread Reply   
 
Thread Tools Display Modes
midnight9
Senior Member
Join Date: Nov 2012
Old 03-28-2015 , 19:08   Re: [Any] Classy Crash Logger
Reply With Quote #91

Quote:
Originally Posted by friagram View Post
nonclassy crash logger:

PHP Code:
For /"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 /
"tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do (
  
set /"Hour=100%%A%%100"
  
set Min=%%B
  set Sec
=%%C
)
if %
Hourgeq 12 (
  
set AMPM=PM
  set 
/"Hour-=12"
) else set "AMPM=AM"
if %Hourequ 0 set "Hour=12"
if %Hourlss 10 set "Hour=0%Hour%"
set "Allm=%Hour%.%Min%.%Sec% %AMPM%"

ECHO %All% %Allmsrcds started >> crashlog.txt
type crashlog
.txt

<stuff>

For /
"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 /
"tokens=1,2,3 delims=:,. " %%A in ('echo %time%') do (
  
set /"Hour=100%%A%%100"
  
set Min=%%B
  set Sec
=%%C
)
if %
Hourgeq 12 (
  
set AMPM=PM
  set 
/"Hour-=12"
) else set "AMPM=AM"
if %Hourequ 0 set "Hour=12"
if %Hourlss 10 set "Hour=0%Hour%"
set "Allm=%Hour%.%Min%.%Sec% %AMPM%"

ECHO %All% %AllmWARNINGsrcds crashedrestarting  >> 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% %AllmServer Terminated Was Not Responsive >> "path\to\crashlog.txt"

and in your steamcmd update file

ECHO %All% %AllmServer Updated >> "path\to\crashlog.txt" 
And how do i use this?

Any chance to make this plugin log to file rather than webpage?
midnight9 is offline
Fearts
ferts of daeth
Join Date: Oct 2008
Old 10-08-2015 , 07:26   Re: [Any] Classy Crash Logger
Reply With Quote #92

I started getting this error. Any idea how to fix it?

Code:
Deprecated
Code:
:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /usr/www/disc/public/crashlog/index.php on line 7
__________________
Fearts is offline
Teamkiller324
Senior Member
Join Date: Feb 2014
Location: Earth
Old 10-31-2015 , 14:28   Re: [Any] Classy Crash Logger
Reply With Quote #93

Quote:
Originally Posted by Fearts View Post
I started getting this error. Any idea how to fix it?

Code:
Deprecated
Code:
:  mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /usr/www/disc/public/crashlog/index.php on line 7
same here
__________________
Teamkiller324 is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-05-2015 , 01:50   Re: [Any] Classy Crash Logger
Reply With Quote #94

You could have found your answer by using The Google: http://stackoverflow.com/questions/1...-mysql-connect
__________________
DarthNinja is offline
Fearts
ferts of daeth
Join Date: Oct 2008
Old 06-16-2017 , 12:15   Re: [Any] Classy Crash Logger
Reply With Quote #95

Updated index.php code to fix the Deprecated code attached. (Code edited by Pelipoika)
Attached Files
File Type: zip index.zip (1.5 KB, 91 views)
__________________
Fearts is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode