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

[TF2] LogUpload (v0.1.5, 7/4/2013)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nikkii
Member
Join Date: Feb 2012
Plugin ID:
3618
Plugin Version:
0.1.3
Plugin Category:
Statistical
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Automatically uploads logs to logs.tf
    Old 04-14-2013 , 20:50   [TF2] LogUpload (v0.1.5, 7/4/2013)
    Reply With Quote #1

    LogUpload

    Description
    Automatically uploads logs to logs.tf via cURL (Socket is planned and written, except it doesn't currently work). This is like LogUploader, however with a developer API, response parsing and way more options.

    It works by hooking the game end events and flushing the log with 'log on' which resets logging. It then scans for files edited in the last 5 seconds and finds the one with the lowest 'sub id', which is what it uploads. After uploading, it will show the log url based on the sm_logupload_display cvar.

    Cvars
    Code:
    sm_logupload_version - Shows version
    sm_logupload_enabled - Enables/Disables LogUpload (Default: Enabled)
    sm_logupload_updater - Enables/Disables Auto Updating (Default: Enabled)
    sm_logupload_key - Your logs.tf API key
    sm_logupload_title - Title to use on logs.tf (Use {BLUENAME}, {REDNAME} and {MAP} to customize)
    sm_logupload_delay - Delay in seconds that a log may not be uploaded for, recommended at least 60 to prevent log upload spamming, though it should never happen.
    sm_logupload_mode - Determines when LogUpload should upload logs
    Combine these values for more than 1 (default, more to come! I need ideas!):
    1: mp_tournament == 1
    2: No bots (Excludes STV/Replay)
    sm_logupload_display - Determines how LogUpload displays uploaded log urls
    Combine these values for more than 1:
    1: Show log URL in chat
    2: Show log URL in hint box
    4: Show log URL in center message
    Dependencies
    Requires the cURL extension and colors, along with the modified json include.

    Generating a key
    1. Log in to http://logs.tf through steam
    2. Click 'Upload Logs' in the top right (http://logs.tf/uploader)
    3. Click on "File upload API Key Generation"
    4. If you have a key, copy it. If not, click "Generate new API key"
    5. Follow the instructions below to use it.

    Installation instructions
    1. Install the cURL extension or verify it is installed via "sm exts list"
    2. Download the zip file (End of the thread)
    3. Extract it into <server directory>/orangebox/tf/addons/sourcemod
    4. Run 'sm plugins load logupload'
    5. Edit <server directory>/orangebox/tf/cfg/sourcemod/plugin.logupload.cfg and add in your logs.tf api key (See 'Generating a key')
    6. Run 'sm plugins reload logupload' to reload settings
    7. Play a round and try it out! Settings can be customized in <server directory>/orangebox/tf/cfg/sourcemod/plugin.logupload.cfg

    Developer information
    View https://github.com/nikkiii/logupload.../logupload.inc for functions which may be accessed by other plugins and forwards.

    Changelog
    Quote:
    4/14/2013 (v0.1.1)
    Initial release.
    6/4/2013 (v0.1.3)
    Display is now a flag consisting of options added together, sv_logsdir for directory, time limits to prevent mass uploading, force upload native, updater support
    6/28/2013 (v0.1.4)
    Small fix to library registration, setting the convar bound for display mode in case it is a direct upgrade/reload from 0.1.1
    7/4/2013 (v0.1.5)
    Include SMJansson support, change updater to pull from github, auto compiler.
    Plans
    • Fix the 'Socket' upload method!
    • Add more replacements for title
    • Improve Plugin API

    Current Problems
    • Socket extension uploading broken due to either code problem or extension problem. If anybody wishes to attempt to fix I suggest redirecting the request to a remote server with "nc -l -p 5000 > req.txt" and looking at what it does, it simply skips blocks.

    Download
    The project is currently hosted on Github.
    Regular users may wish to download the entire zip file from here: https://github.com/nikkiii/logupload/archive/master.zip
    Developers may wish to view the source of this here

    Addons/Modules
    LogUpload In-Game Viewer
    __________________
    Owner of ProbablyAServer, a server without game changing mods and donation benefits

    RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

    Last edited by Nikkii; 07-04-2013 at 14:52. Reason: Cleaned up
    Nikkii is offline
    arcadetf2
    New Member
    Join Date: May 2013
    Old 05-04-2013 , 15:47   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #2

    Hey, I tried this out on a TF2lobby game just now and the plugin went a bit overzealous on uploading logs - uploaded them separately something like 50 times. Any suggestions as to why this might be?
    arcadetf2 is offline
    Nikkii
    Member
    Join Date: Feb 2012
    Old 05-04-2013 , 22:13   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #3

    Quote:
    Originally Posted by arcadetf2 View Post
    Hey, I tried this out on a TF2lobby game just now and the plugin went a bit overzealous on uploading logs - uploaded them separately something like 50 times. Any suggestions as to why this might be?
    Hm, that's weird.. I've been using it on TF2Lobby and it works fine, next time it does it see if it reports any errors I guess =\

    Edit: Also, any more information? Like, Highlander or 6v6, which map, what happened when it was uploading (Did it say 'uploaded log to' 50 times? or actually 50 different uploads?)
    __________________
    Owner of ProbablyAServer, a server without game changing mods and donation benefits

    RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

    Last edited by Nikkii; 05-04-2013 at 23:53.
    Nikkii is offline
    arcadetf2
    New Member
    Join Date: May 2013
    Old 05-05-2013 , 15:17   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #4

    It was a HL badwater lobby. It was actually closer to 70 different uploads before I managed to shut the server down - separate uploads but all from the same log file. For each one the plugin wrote to the game chat.
    arcadetf2 is offline
    Nikkii
    Member
    Join Date: Feb 2012
    Old 05-07-2013 , 03:12   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #5

    Quote:
    Originally Posted by arcadetf2 View Post
    It was a HL badwater lobby. It was actually closer to 70 different uploads before I managed to shut the server down - separate uploads but all from the same log file. For each one the plugin wrote to the game chat.
    Hm, that's weird... I've used it with a few lobbies and it hasn't done anything like this, so unless there's something messing with the game events when ending it shouldn't do that
    __________________
    Owner of ProbablyAServer, a server without game changing mods and donation benefits

    RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper
    Nikkii is offline
    Duckeh
    Junior Member
    Join Date: Mar 2013
    Old 05-07-2013 , 03:23   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #6

    For what it's worth, I've had this happen with my plugin once before too.
    At the time it was caused by doing 'mp_switchteams' on a payload game which had a winlimit set. For some reason that would basically get the server in an infinite loop and start killing it.

    I thought this was fixed with an update, but I'm not sure.
    Also this wasn't because of my plugin (I hope? ) but it did make my plugin spam messages like crazy.
    Duckeh is offline
    arcadetf2
    New Member
    Join Date: May 2013
    Old 05-09-2013 , 09:44   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #7

    Just as an update, I've used it since then with regular scrims and with more lobbies and it's worked fine on those occasions.
    I didn't do anything differently on those occasions though, so it's still strange.
    Otherwise, it is a very nice plugin, so thank you for that

    Last edited by arcadetf2; 05-09-2013 at 09:44.
    arcadetf2 is offline
    Nikkii
    Member
    Join Date: Feb 2012
    Old 05-09-2013 , 16:42   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #8

    Quote:
    Originally Posted by arcadetf2 View Post
    Just as an update, I've used it since then with regular scrims and with more lobbies and it's worked fine on those occasions.
    I didn't do anything differently on those occasions though, so it's still strange.
    Otherwise, it is a very nice plugin, so thank you for that
    Thanks for the response

    I'm planning a few improvements, Duckeh suggested that he had someone comment on his thread saying to use sv_logsdir, so that'll be one change, and also I'll be adding a new display mode selector (It'll be a bit flag like the activity setup) which will let you choose any of the modes, or all

    I'll likely add a check to prevent problems like that (Limiting log uploads to one every 60 seconds possibly? Since a whole match won't be happening in 60 seconds, at least one you'd want to upload)
    __________________
    Owner of ProbablyAServer, a server without game changing mods and donation benefits

    RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

    Last edited by Nikkii; 05-09-2013 at 16:42.
    Nikkii is offline
    mycologist
    SourceMod Donor
    Join Date: Sep 2008
    Location: Sep 2008
    Old 05-14-2013 , 13:45   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #9

    Great work on this plugin. I have one minor issue when it comes to using this with MatchMod. MatchMod separates matches into two halves and generates two log files; one for each half. When the first half finishes, your plugin uploads the first log and works perfectly. However, when the second half finishes nothing happens. Any ideas on how we could make this work with MatchMod? I can provide any details you need.
    __________________

    mycologist is offline
    Nikkii
    Member
    Join Date: Feb 2012
    Old 05-15-2013 , 14:28   Re: [TF2] LogUpload (v0.1.1, 4/14/2013)
    Reply With Quote #10

    Quote:
    Originally Posted by mycologist View Post
    Great work on this plugin. I have one minor issue when it comes to using this with MatchMod. MatchMod separates matches into two halves and generates two log files; one for each half. When the first half finishes, your plugin uploads the first log and works perfectly. However, when the second half finishes nothing happens. Any ideas on how we could make this work with MatchMod? I can provide any details you need.
    I can't see anything in MatchMod that could change the way this plugin works besides it closing the log file too, however the plugin should sense that and choose the log with the lowest numerical id if possible. I'm currently writing a little debug tool to help with game events even when the server log is being opened and closed often, I'll let you know when it's done if you wish to help figure out this problem

    Also, the new version will include a better way to choose display modes, a fix to the native for other plugins which may use it and not include valid arguments, auto updating (via Updater) and of course the sv_logsdir fix. It still needs to be tested, so it might be a few days unless I have time later today to sit down and confirm it works correctly.
    __________________
    Owner of ProbablyAServer, a server without game changing mods and donation benefits

    RCON Helper | [TF2] LogUpload | CCC Donator Tags | PHP Steam API Wrapper

    Last edited by Nikkii; 05-15-2013 at 14:30.
    Nikkii is offline
    Reply



    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 11:56.


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