AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Classy Crash Logger (https://forums.alliedmods.net/showthread.php?t=115080)

DarthNinja 01-10-2010 01:45

[Any] Classy Crash Logger
 
2 Attachment(s)
[Any] Classy Crash Logger
Plugin Version 2.0.0
Web Interface Version 2.0.0


Description:
Logs server crashes to a mysql database and displays a list on a user friendly web page.

Notes:
This plugin does not log to the database when the map changes, only when the server restarts after an unexpected (forced) shutdown.
Graceful shutdowns do not log.
Live Demo Page!

Requirements:
  • Webserver with php and mysql
Commands:
None.

Cvars:

  • sm_crashlogger_version
    • Plugin version
  • sm_crashlogger_offset
    • Number of seconds to alter the server timestamp by.
    • Default: 0
  • sm_crashlogger_servername
    • User friendly name of the server to display. If left blank, the server hostname will be used.
    • Default: ""
  • sm_crashlogger_serverid
    • Unique numeric server ID used for filtering on the web app.
    • Default: 1
Install Instructions:
  • Plugin:
    1. Upload the .smx file to your /sourcemod/plugins/ folder
    2. Update your databases.cfg file as shown below
  • Web Interface:
    1. Update the config.php file with your database info.
    2. Upload website files to your webserver

Configure and add these lines to your databases.cfg file:
Code:

    "crashlogger"
    {
        "driver"            "mysql"
        "host"                "webserver IP"
        "database"            "database name"
        "user"                "database username"
        "pass"                "database username password"
        //"timeout"            "0"
        "port"            "3306"
    }



Notes:
Make sure you allow your game server mysql access to your web server.

You may want to force-restart your server to make sure everything logs correctly. The plugin will configure it's database the first time it runs and will add a new log entry every time the server starts after a crash.

Plugin creates a settings file in /cfg/sourcemod/ by the name of plugin.Crashlogger.cfg

Web Version History:
  • V1.0
    • Initial Release
  • V2.0.0
    • Complete rewrite
    • Multi-server compatible!
    • Now lists the hostname or custom name of the servers.
    • Servers are now filterable on the list by ID number.
    • Looks Purrdy! (not so much)
    • CSS2.1/CSS3 Compliant!
    • XHTML 1.0 Compliant!
Plugin Version History:
  • V1.0
    • Initial Release
  • V2.0.0
    • Complete rewrite
    • Plugin now uses threaded connections and queries
    • Cvar added to set a custom name for the server to display on the web interface. Defaults to the server hostname.
    • Cvar added to set a server ID number (for site crash filtering).
    • Cvar added to set a time offset to alter the server timestamp by.
    • Feature added to detect crashes / forced restarts from graceful server restarts. Only crashes and forced restarts will be logged.



Total plugin downloads prior to last edit: 425
Total site downloads prior to last edit: 188

shustas 01-10-2010 09:48

Re: [Any] Classy Crash Logger
 
good thing, just why we need web when all this can be easily done in simple log file. Some people hate php and mysql like me

Mnkras 01-10-2010 12:47

Re: [Any] Classy Crash Logger
 
i just use a batch file so the output looks like this:

(17:25:03.76) WARNING: srcds closed or crashed, restarting.
(17:25:03.76) srcds started.
(21:20:32.24) WARNING: srcds closed or crashed, restarting.
(21:20:32.26) srcds started.
(18:24:06.56) WARNING: srcds closed or crashed, restarting.
(18:24:06.57) srcds started.
(11:11:22.93) WARNING: srcds closed or crashed, restarting.
(11:11:22.93) srcds started.

DarthNinja 01-10-2010 14:00

Re: [Any] Classy Crash Logger
 
It's easier for me because I don't have to download and pick through 5000 line log files.
If you think you have something better, don't use it.

shustas 01-10-2010 14:59

Re: [Any] Classy Crash Logger
 
batch file is good only if server is on your pc.
Im sure server doesnt crash 5000 times, so dont think its big prob. If it does, then u have a prob mate.
Could u add a log file support for it?

Nomarky 01-10-2010 16:44

Re: [Any] Classy Crash Logger
 
Quote:

Originally Posted by Mnkras (Post 1050490)
i just use a batch file so the output looks like this:

(17:25:03.76) WARNING: srcds closed or crashed, restarting.
(17:25:03.76) srcds started.
(21:20:32.24) WARNING: srcds closed or crashed, restarting.
(21:20:32.26) srcds started.
(18:24:06.56) WARNING: srcds closed or crashed, restarting.
(18:24:06.57) srcds started.
(11:11:22.93) WARNING: srcds closed or crashed, restarting.
(11:11:22.93) srcds started.


Could you share the batch file? I've been trying to do something like this, but havent had much success googling...

CHeers!

DarthNinja 01-10-2010 18:07

Re: [Any] Classy Crash Logger
 
Quote:

Originally Posted by shustas (Post 1050662)
batch file is good only if server is on your pc.
Im sure server doesnt crash 5000 times, so dont think its big prob. If it does, then u have a prob mate.
Could u add a log file support for it?

Crashes aren't the only things in my log files.
I might add log file support, but the idea of the plugin is to get away from log files....

Quote:

Originally Posted by Nomarky (Post 1050748)
Could you share the batch file? I've been trying to do something like this, but havent had much success googling...

CHeers!

You might want to use a private message since this is not related to the plugin.

snelvuur 01-29-2010 11:52

Re: [Any] Classy Crash Logger
 
L 01/29/2010 - 17:51:33: [crashlogger.smx] Can't select database
L 01/29/2010 - 17:51:33: [SM] Native "SQL_FastQuery" reported: Invalid database Handle 0 (error: 4)
L 01/29/2010 - 17:51:33: [SM] Displaying call stack trace for plugin "crashlogger.smx":
L 01/29/2010 - 17:51:33: [SM] [0] Line 63, /home/groups/alliedmodders/forums/files/4/9/8/6/5/57029.attach::createdbtables()
L 01/29/2010 - 17:51:33: [SM] [1] Line 19, /home/groups/alliedmodders/forums/files/4/9/8/6/5/57029.attach::OnPluginStart()

I checked, but this datasource is working (in databases.cfg) i have a whole list of database entry's in there which do work.

Tried to create it manually (sql) based on the source code but still gave same error.

HSFighter 01-29-2010 17:15

Re: [Any] Classy Crash Logger
 
Very nice plugin :up:

Any chance to log Server -IP, -PORT and gamemod-directory?

berni 03-28-2010 16:51

Re: [Any] Classy Crash Logger
 
Please fix screenshot link and comment on snelvuur's post.


All times are GMT -4. The time now is 21:58.

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