How to log and debug
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Photon Server.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How to log and debug
Rumman
2018-08-29 09:08:27
In unity I simple write "Debug.Log(string)", it shows me the string content in the console. In eclipse for appwarp, I use System.PrintIn(string), it shows me the content as soon as I run the java content right from the editor. How to do similar logging and debugging in photon server code?
Comments
Hi @Rumman,
Thank you for choosing Photon!
We use log4net for logging in the server SDK.
You could read more about logging on this page.
@JohnTube wrote:
Hi @Rumman,
Thank you for choosing Photon!
We use log4net for logging in the server SDK.
You could read more about logging on this page.
OMG! that's horrible! Is there no user friendly solution so that I hit F5 on VS, server deploys, server runs, and I can see the log right in a console? :/
of course, there are.
but please do not spend our time teaching you logging. I'm sure you are intelligent enough to discover it your self. Look for Appenders
But because we do not use the console, it could be that you will not see anything. We usually use log files
best,
ilya
@chvetsov wrote:
of course, there are.
but please do not spend our time teaching you logging. I'm sure you are intelligent enough to discover it your self.
Well my loggers are up and running now, ended up using serilog anyway.
People can be intelligent enough to make a socket server too, if that matters in such extent. That's not the point, we use tools/tech/third-party library to save our production time NOT because we can not make them ourselves. Its not something we can or can not, its something we should or should not. Thanks for your tips and I hope photon will be mature enough someday to enable robust debugging and logging, so will its forum mods. :)
Hi, @Rumman
One day you will find how odd sounds all that you wrote.
We did not ask you to write your own logging. All that we asked you just to learn how to use the log4net framework which used by our server-side code.
We are mature enough to not write logging libs our self and to not ask our customers to do so :smile:
best,
ilya
I understand the question and would like to answer for future starting programmers:
Use one of the following in your quantum code, either should work
Log.Write("write something");
Log.Debug(input->MouseDirection.ToString());Run the code in Debug mode from your IDE
In Rider, I click the Debug bug at the top right.
Ignore any break-points that pop up in the code at this time
Start the Unity program
The Console messages should show up in Unity's console now! (Not the coding IDE's.)
Hope this helps anyone who got confused like I did!
Back to top