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

[TF2] LogUploader (v1.4, 2013-05-05)


Post New Thread Reply   
 
Thread Tools Display Modes
Duckeh
Junior Member
Join Date: Mar 2013
Old 03-15-2013 , 16:26   Re: [TF2] LogUploader (v1.2, 2013-03-13)
Reply With Quote #11

Awesome, thanks.
I've been rewriting my version to look more like yours, so thanks a load for that example.

Also been trying to use the JSON parser for the last hour, however "json_get_cell" and "json_get_string" keep returning false
Even with a JSON string like this:
Code:
{"log_id":17277,"url":"/17277","success":true}
Duckeh is offline
Nikkii
Member
Join Date: Feb 2012
Old 03-15-2013 , 17:07   Re: [TF2] LogUploader (v1.2, 2013-03-13)
Reply With Quote #12

Quote:
Originally Posted by Duckeh View Post
Awesome, thanks.
I've been rewriting my version to look more like yours, so thanks a load for that example.

Also been trying to use the JSON parser for the last hour, however "json_get_cell" and "json_get_string" keep returning false
Even with a JSON string like this:
Code:
{"log_id":17277,"url":"/17277","success":true}
Doesn't look like the json include is working The response is always 'INVALID_JSON', so something isn't parsing right... I wonder if psychonic is around to comment on the json include, but it should be working fine since it uses basic functions
__________________
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; 03-15-2013 at 17:09.
Nikkii is offline
Duckeh
Junior Member
Join Date: Mar 2013
Old 03-16-2013 , 09:44   Re: [TF2] LogUploader (v1.3, 2013-03-16)
Reply With Quote #13

So I took a look at calling "log on" to flush everything to file and then grabbing the most recent log with a filesize above 0.
It works pretty well when I start the process using a console command, however when it gets started by the event hook the timestamps mess up for some reason =/
A log which has just been finished will get a timestamp of like 80 seconds ago, whereas when the process is started by a console command the timestamp will be roughly 10 seconds back.

I don't understand why these timestamps are getting messed up like this. I though maybe it could be because at this point I was already looping through about 30 log files to find the most recent one. Using less log files did improve things, but still didn't give me log files with a time difference (current time - file timestamp) of 0, which the current method does.

So for now I've just lowered the time to look for logs to 10 seconds back.
Also did a load of debugging on the JSON parser. Found where it's returning the JSON_INVALID to the handle but can't say I understand enough of it to be able to fix anything.
Duckeh is offline
JakeSanchard
New Member
Join Date: Mar 2013
Old 03-19-2013 , 07:43   Re: [TF2] LogUploader (v1.3, 2013-03-16)
Reply With Quote #14

I am new to SourceMod and server configs so I'll come out and say it.

Can I install this without cURL extension? If not, how do I install it? There's no tutorial on the mod page for cURL extension and the download has different directories and files so I don't know what I'm uploading to my server.

I apologize for my ignorance but I really like the idea of this mod since I use logs.tf a lot and automated uploading would be great!
JakeSanchard is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 03-19-2013 , 09:26   Re: [TF2] LogUploader (v1.3, 2013-03-16)
Reply With Quote #15

Quote:
Originally Posted by JakeSanchard View Post
Can I install this without cURL extension?
Yes, but it won't load. Or in other words: no.

Quote:
Originally Posted by JakeSanchard View Post
If not, how do I install it?
Like every other extension, that's why there are no instructions on the extensions page itself.

I suggest reading this.
It teaches you how to install plugins and extensions. And also helps you troubleshooting problems you have on the way.
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
JakeSanchard
New Member
Join Date: Mar 2013
Old 03-19-2013 , 09:49   Re: [TF2] LogUploader (v1.3, 2013-03-16)
Reply With Quote #16

Quote:
Originally Posted by Thrawn2 View Post
Yes, but it won't load. Or in other words: no.

Like every other extension, that's why there are no instructions on the extensions page itself.

I suggest reading this.
It teaches you how to install plugins and extensions. And also helps you troubleshooting problems you have on the way.
That's great, thanks! I guess .SMX files go to /orangebox/tf/addons/sourcemod/extensions and anything within folders go in existing folders of the same name then. Thanks for the quick reply too.
JakeSanchard is offline
userid_ivan
Junior Member
Join Date: May 2011
Old 05-02-2013 , 04:19   Re: [TF2] LogUploader (v1.3, 2013-03-16)
Reply With Quote #17

Hi,
I wanted to give you a suggestion about handling "logs" directory. Actually logs folder is hardcoded on plugin's sourcecode but it does not work on forked servers where logs directory is different. For example I have a forked server and inside logs directory i have N folders for every forked server (server01, server02 etc..).
You should use sv_logsdir variable to get the right logs directory.
userid_ivan is offline
Duckeh
Junior Member
Join Date: Mar 2013
Old 05-05-2013 , 09:51   Re: [TF2] LogUploader (v1.4, 2013-05-05)
Reply With Quote #18

Thanks Ivan, I've updated the plugin to use sv_logsdir for the logsdir!

So yeah, updated to version 1.4 today. Let me know if weird stuff happens, cause again I haven't had much time to do much development on this plugin, let alone testing!

Also, again, a big thanks to Nikkii for his examples and for fixing the JSON include!
Duckeh is offline
Nikkii
Member
Join Date: Feb 2012
Old 05-07-2013 , 03:17   Re: [TF2] LogUploader (v1.4, 2013-05-05)
Reply With Quote #19

Quote:
Originally Posted by Duckeh View Post
Thanks Ivan, I've updated the plugin to use sv_logsdir for the logsdir!

So yeah, updated to version 1.4 today. Let me know if weird stuff happens, cause again I haven't had much time to do much development on this plugin, let alone testing!

Also, again, a big thanks to Nikkii for his examples and for fixing the JSON include!
her* Also, make sure to use the other version I linked in PM, it fixes a bug with ending strings

Also, it's a lot easier and cleaner to just use the log_id json value than both, since you actually have a url that is already formed and you're just adding the id onto it instead of the possibility of a malformed url if it isn't there

(If logs.tf changes their 'url' response to a different sub path then it might break, however)
__________________
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:32   Re: [TF2] LogUploader (v1.4, 2013-05-05)
Reply With Quote #20

Quote:
Originally Posted by Nikkii View Post
her*
I already thought it would be a slightly odd name for a dude, but then again this is the internet.. So you never know! My bad!
Duckeh 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 04:04.


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