Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to log reports/commands/chat?

Asked by
stepatron 103
5 years ago

What are some methods to log such things? I want to log a players admin commands and what they chatted etc. External API? If so what? Or is there a way to create a text file that would record it all? I apologize if this is too broad of a subject, but I don't know how else to phrase this..

0
has to be involved with httpservice.. not sure awesomeipod 607 — 5y
0
Trello and Google Analytics are two very good ways to log information, but why are you logging all chat messages? That's going to fill up a request limit for any website you use so I'd recommend only logging important information User#9949 0 — 5y

1 answer

Log in to vote
0
Answered by
theCJarmy7 1293 Moderation Voter
5 years ago

Your question intrigued me.

And so, I went on a half-hour long journey of pain to attempt to set up a primitive logging system.

I used node.js and for hosting this nifty little site called repl.it which just lets you run code on the interwebs. You can find the code for the server here, simply paste that into a node.js repl and send some post requests like so:

local function sendString(str)
    return httpService:PostAsync("Link Here, not to the part with the text editor, to the dedicated link repl.it gives you",str)
end

print(sendString(httpService:JSONEncode({"A msg"})))

The JSON encode part is there because otherwise it throws a bad request error, and I don't know how to fix it...

But yea, that's my dumb way of logging things, if anybody has a better method please enlighten us.

Ad

Answer this question