question

martinliu1993 avatar image
martinliu1993 asked

How to write/view server logs?

I have 2 questions.

1. When my client calls "RedeemMatchTicket" and it is successful, I see that the Server does create a game and a game shows up in the "Active Game" tab, but after about 10 seconds, the game seems to be shut down automatically. I haven't made any client calls, why would the game automatically shut down?

2. (Related to 1)

I suspect the problem I am having with 1 is something on the server throwing errors. But I don't know how to view the logs that may be generated on the Server. How do I do that?

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

Unfortunately, there's no way for us to know what your server is doing on startup, as it's entirely your code. You're right that your best bet is to do good logging in your server, and check that info when the server exits. To write to a log file in Unreal, make sure you're passing in the correct command line info for Unreal, as shown in the custom game server guide: https://api.playfab.com/docs/custom-game-servers (which is to say, use the ABSLOG command line parameter).

If you're looking for info on writing to log files from Unreal, their docs detail that here: https://wiki.unrealengine.com/Logs,_Printing_Messages_To_Yourself_During_Runtime

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.