View Single Post
Author Message
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-10-2010 , 01:45   [Any] Classy Crash Logger
Reply With Quote #1

[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
Attached Files
File Type: sp Get Plugin or Get Source (CrashLogger.sp - 2096 views - 3.7 KB)
File Type: zip Web.zip (12.8 KB, 803 views)
__________________

Last edited by DarthNinja; 08-10-2011 at 00:59.
DarthNinja is offline