question

rob avatar image
rob asked

How to collect log files from a Unity server

Hi,

My server is a Unity build and I'm having trouble viewing log files.

The following documentation suggests that I need to change the command line parameter -log_file_path=<log_file_path> to -logFile <log_file_path> but I've not had any joy with that either.

https://docs.unity3d.com/Manual/CommandLineArguments.html

I'm finding the documentation here quite vague: https://api.playfab.com/docs/custom-game-servers

Is anyone else here running a Unity server and getting logs?

Custom Game Servers
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

Yes, we have quite a few users running Unity servers and collecting logs. In fact, we have a sample Unity server that you can use as the basis for building your own here: https://github.com/PlayFab/PlayFabGameServer. You can see an example of getting the log_file_path from your command line here, specifically: https://github.com/PlayFab/PlayFabGameServer/blob/bd07a13bf6c72e0b7e3a388c1f94f1d2da14c06e/GameServerSource/Assets/Packages/DefaultPackages/PlayFabServer/Commands/PlayFabServerStartupCommand.cs.

1 comment
10 |1200

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

rob avatar image rob commented ·

Very useful, thanks! I think people might find it helpful to have a link to that from the custom game server tutorial (https://api.playfab.com/docs/custom-game-servers). I wouldn't have known where to look for it.

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.