question

Voilamonsieur.com avatar image
Voilamonsieur.com asked

Server log

Where can I find the server logs ? I'm using somthing like that on the cloud script

log.info("informations : " + myInformations);

So where are the logs ? Must I use something else instead ?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The log output is returned in the results from the call to RunCloudScript as "Results" and "ResultsEncoded". We'll have more options available for debugging of Cloud Script in an upcoming release.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Voilamonsieur.com avatar image
Voilamonsieur.com answered

I wasn't accurate enought in my description. I'm looking for a tool to log some events, not really for debugging. I would like to record all abnormal situation, like uncorrect responses from another player, someone with an incorrect id, someone who is trying to cheat and so on. So I thought about a log on the server, or, it can be anything else if any tool like that exists.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Ah, in that case, I would recommend using the LogEvent call to generate a custom event with whatever information you need. That would then give you the ability to do data analysis on user behaviors in your game, to find those situations. We have a few options for analytics in our Add-ons marketplace right now, and we'll be adding to that shortly.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Voilamonsieur.com avatar image
Voilamonsieur.com answered

Ok for LogEvent or a data analysis plugin, but is there somewhere an example or a tutorial to include that in my server script ?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

To use LogEvent in Cloud Script, you would call it as server.LogEvent. There are a lot of options, which are detailed in the doc page for LogEvent, here: http://api.playfab.com/Documentation/Server/method/LogEvent. For example, if you wanted to send an event stating that the player died at a specific location, you would use the currentPlayerId for the PlayFabId, a custom EventName, and then provide any details you need (like XYZ location) in the Body.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.