Raised This Month: $7 Target: $400
 1% 

[Any] Classy Crash Logger


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
1393
Plugin Version:
2.0.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Logs server restarts to a webpage
    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 - 2080 views - 3.7 KB)
    File Type: zip Web.zip (12.8 KB, 797 views)
    __________________

    Last edited by DarthNinja; 08-10-2011 at 00:59.
    DarthNinja is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 01-10-2010 , 09:48   Re: [Any] Classy Crash Logger
    Reply With Quote #2

    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
    __________________
    shustas is offline
    Mnkras
    Senior Member
    Join Date: Mar 2009
    Location: 127.0.0.1
    Old 01-10-2010 , 12:47   Re: [Any] Classy Crash Logger
    Reply With Quote #3

    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:202.24) WARNING: srcds closed or crashed, restarting.
    (21:202.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.
    __________________
    Mnkras is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 01-10-2010 , 14:00   Re: [Any] Classy Crash Logger
    Reply With Quote #4

    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.
    __________________
    DarthNinja is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 01-10-2010 , 14:59   Re: [Any] Classy Crash Logger
    Reply With Quote #5

    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?
    __________________
    shustas is offline
    Nomarky
    SourceMod Donor
    Join Date: Sep 2007
    Old 01-10-2010 , 16:44   Re: [Any] Classy Crash Logger
    Reply With Quote #6

    Quote:
    Originally Posted by Mnkras View Post
    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:202.24) WARNING: srcds closed or crashed, restarting.
    (21:202.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!
    Nomarky is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 01-10-2010 , 18:07   Re: [Any] Classy Crash Logger
    Reply With Quote #7

    Quote:
    Originally Posted by shustas View Post
    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 View Post
    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.
    __________________
    DarthNinja is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 01-29-2010 , 11:52   Re: [Any] Classy Crash Logger
    Reply With Quote #8

    L 01/29/2010 - 17:513: [crashlogger.smx] Can't select database
    L 01/29/2010 - 17:513: [SM] Native "SQL_FastQuery" reported: Invalid database Handle 0 (error: 4)
    L 01/29/2010 - 17:513: [SM] Displaying call stack trace for plugin "crashlogger.smx":
    L 01/29/2010 - 17:513: [SM] [0] Line 63, /home/groups/alliedmodders/forums/files/4/9/8/6/5/57029.attach::createdbtables()
    L 01/29/2010 - 17:513: [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.
    snelvuur is offline
    HSFighter
    Veteran Member
    Join Date: Aug 2007
    Location: Flensburg - Germany
    Old 01-29-2010 , 17:15   Re: [Any] Classy Crash Logger
    Reply With Quote #9

    Very nice plugin

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



    Sorry for my very bad english
    Greetings HSFighter

    Last edited by HSFighter; 01-29-2010 at 18:07.
    HSFighter is offline
    Send a message via ICQ to HSFighter
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 03-28-2010 , 16:51   Re: [Any] Classy Crash Logger
    Reply With Quote #10

    Please fix screenshot link and comment on snelvuur's post.
    __________________
    Why reinvent the wheel ? Download smlib with over 350 useful functions.

    When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
    powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
    berni 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 07:55.


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