- Home /
Enable logging in custom script (Photon Server)
Is there something I need to do to enable logging other than: using ExitGames.Logging;
and private static readonly ILogger log = LogManager.GetCurrentClassLogger();
?
I'm editing the default LoadBalancing server created by ExitGames and log.Debug()
works in all other scripts except for the one I just created.
Answer by jtsmith1287 · Aug 13, 2014 at 06:12 AM
The following is needed in the server's log4net.config as well as setting the log manager within the class.
<logger name="Your.Custom.Class.Name">
<level value="DEBUG" />
<appender-ref ref="LogFileAppender" />
</logger>
Answer by shvez · Aug 12, 2014 at 11:57 AM
readonly ILogger log = LogManager.GetCurrentClassLogger();?
this is enough. please check your log4net.config, may be your logger is suppressed there
http://doc.exitgames.com/en/onpremise/current/reference/logging I found the answer. I wasn't adding a logger entry in the config file. Once I added it it worked fine.