question

brendan avatar image
brendan asked

Access to Cloud Script Logs with mobile dev?

mgesner
started a topic on Thu, 28 May 2015 at 5:58 PM

I am currently working on a mobile app via Unity, and have found debugging with the cloud script logs to be tedious by parsing each call, and trying to echo the call back to the console.

What solutions do you have to review your log in realtime while using your client applications?

As an example, writing your own logging function to log to a user or title data (I hate this solution, but it may be the easiest workaround)

Are there simple ways to use a curl call in a console window to access your log entries?

Looking for best practices here...

10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

Best Answer
johntube said on Fri, 29 May 2015 at 2:01 PM

You have to wait until the output of the logs functions is accessible from a dedicated tab in the GameManager !

Meanwhile I'm using the workaround you mentioned :

//TEMPORARY solution until PlayFab's log functions are available from CloudScript
function Log(message, data) {
    server.SetTitleData({
        Key: GetISOTimestamp(),
        Value: message + ' ' + JSON.stringify(data)
    });
}

function GetISOTimestamp() {
    var now = new Date(),
        timestamp = now.toISOString();
    return timestamp;
}

1 Comment
johntube said on Fri, 29 May 2015 at 2:01 PM

You have to wait until the output of the logs functions is accessible from a dedicated tab in the GameManager !

Meanwhile I'm using the workaround you mentioned :

//TEMPORARY solution until PlayFab's log functions are available from CloudScript
function Log(message, data) {
    server.SetTitleData({
        Key: GetISOTimestamp(),
        Value: message + ' ' + JSON.stringify(data)
    });
}

function GetISOTimestamp() {
    var now = new Date(),
        timestamp = now.toISOString();
    return timestamp;
}
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.