question

aaron123 avatar image
aaron123 asked

Photon handler logging

Im creating a game in photon and am using the built in photon handlers (roomCreate, roomEvent).

I was just wondering if there is a way i can log some info/comments in the playstream dashboard. When I try log.error/info/debug, and then i click on a playstream info for the event, all I get is

{
    "EventName": "room_event_raised",
    "EventNamespace": "title.27AC",
    "EntityType": "title",
    "Source": "27AC",
    "EventId": "76a81b3b654842889405cc96b9f0ce2d",
    "EntityId": "27AC",
    "SourceType": "GameServer",
    "Timestamp": "2018-02-01T16:53:09.8066319Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null
}

any way to get the { Log: stuff}? Ive read i have to set GeneratePlayStreamEvent = true, but im not sure how to do that seeing how Im not actually calling cloudscript from unity but rather photon is automatically. Thanks
CloudScript
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

·
pfnathan avatar image
pfnathan answered

In order to get log info/comments in the PlayStream dashboard; You can configure the `GeneratePlayStreamEvent` flag in webhook settings on Photon dashboard as work around.

5 comments
10 |1200

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

aaron123 avatar image aaron123 commented ·

The only thing in webhook settings is the 10 key/value pairs that were initially there. (Async join, PathCreate, etc) and no way to add a new one, only an edit button for those. I can't find any other area of the dashboard that relates to webhooks. Am I looking in the wrong place?

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

After second look it seems that our Photon Webhook is not generating "GeneratePlayStreamEvent" we have filed a task to fix this. In the meanwhile, you can use `server.WritePlayerEvent` to record "log/Comments" to log as a custom event.

0 Likes 0 ·
Hamza Lazaar avatar image Hamza Lazaar pfnathan ♦ commented ·

@pfnathan

may I know where did you get this "GeneratePlayStreamEvent" from?

there is no such setting for Photon webhooks.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

You can search that string from our doc site ;

https://api.playfab.com/documentation/client/method/ExecuteCloudScript

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

@Hamza.Sorry for the confusion, Please ignore my last comments. Using Server. WritePlayerEvent is still recommended.

0 Likes 0 ·

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.