[Solved] Log File Not Being Created
Options
Hello All, I have read through all the topics I could find pertaining to this issue and none of the ones Ive found help. I am sure its something simple but I'm just racking my brain on it. I'm following some tutorials I found on youtube on setting up the server/client from scratch so I will paste what my logs show, and my code/config.
I don't see any errors, everything compiles and starts up fine but no log is being put in either:
- C:\Users\Austin\Desktop\server\deploy\PhotonIntro\bin\log
- C:\Users\Austin\Desktop\server\deploy\PhotonIntro\Log
In my client code it connects and disconnects just fine and im using Debug.Log("asdfasdfa") when connecting and disconnecting so I have messed up something obviously.
Thanks for any help!
Server Code:
log4net config:
Photon CLR
Photon Instance 1
I don't see any errors, everything compiles and starts up fine but no log is being put in either:
- C:\Users\Austin\Desktop\server\deploy\PhotonIntro\bin\log
- C:\Users\Austin\Desktop\server\deploy\PhotonIntro\Log
In my client code it connects and disconnects just fine and im using Debug.Log("asdfasdfa") when connecting and disconnecting so I have messed up something obviously.
Thanks for any help!
Server Code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Photon.SocketServer; using System.IO; using ExitGames.Logging; using ExitGames.Logging.Log4Net; using log4net.Config; namespace PhotonIntro { public class PhotonServer : ApplicationBase { #region Overload of Application Base protected override PeerBase CreatePeer(InitRequest initRequest) { return new UnityClient(initRequest.Protocol, initRequest.PhotonPeer); } protected override void Setup() { var file = new FileInfo(Path.Combine(BinaryPath, "log4net.config")); if (file.Exists) { LogManager.SetLoggerFactory(Log4NetLoggerFactory.Instance); XmlConfigurator.ConfigureAndWatch(file); } } protected override void TearDown() { } #endregion } }
log4net config:
<?xml version="1.0" encoding="utf-8" ?> <log4net debug="true"> <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %-30.30c{2} %m% [%t] [%x]%n" /> </layout> </appender> <!-- "normal" log file appender --> <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender"> <param name="File" value="log\PhotonIntro.log" /> <param name="AppendToFile" value="true" /> <param name="MaxSizeRollBackups" value="1" /> <param name="MaximumFileSize" value="250MB" /> <param name="RollingStyle" value="Size" /> <param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" /> </layout> </appender> <!-- performance counter log file appender --> <appender name="CounterAppender" type="log4net.Appender.RollingFileAppender"> <param name="File" value="log\PhotonIntroCounter.log" /> <param name="AppendToFile" value="true" /> <param name="MaxSizeRollBackups" value="1" /> <param name="MaximumFileSize" value="1MB" /> <param name="RollingStyle" value="Size" /> <param name="StaticLogFileName" value="true" /> <param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%d{ABSOLUTE} %m%n" /> </layout> </appender> <!-- logger --> <root> <level value="DEBUG" /> <appender-ref ref="LogFileAppender" /> <appender-ref ref="ConsoleAppender" /> </root> <!-- operation data logger --> <!-- set level to DEBUG to enable operation data logging--> <logger name="OperationData" additivity="false"> <level value="DEBUG" /> <appender-ref ref="LogFileAppender" /> </logger> <!-- performance counter logger --> <!-- set level to DEBUG to enable performance counter logging--> <logger name="PerformanceCounter" additivity="false"> <level value="DEBUG" /> <appender-ref ref="CounterAppender" /> </logger> </log4net>
Photon CLR
2011-11-11 16:45:54,065 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created 2011-11-11 16:46:33,528 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created 2011-11-11 16:46:33,580 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - PhotonDomainManager created 2011-11-11 16:46:33,587 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - InitializeNewDomain PhotonSocketServer.exe 2011-11-11 16:46:33,609 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - AppDomains with unhandled exceptions are usually not unloaded and restarted. 2011-11-11 16:46:33,629 [ 1] INFO eBMsheuTZBd5s8ouhU.eLmj1LZaowJ13vNcFy - ### PhotonHostRuntime.Licensing: Getting license information... 2011-11-11 16:46:38,355 [ 1] INFO eBMsheuTZBd5s8ouhU.eLmj1LZaowJ13vNcFy - LICENSE: Expiration: never; floating license: yes; max connections: 100; valid IPs: any 2011-11-11 16:46:38,417 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Lite , Lite 2011-11-11 16:46:38,474 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:46:38,480 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Lite;Lite\bin;bin_Win64;Shared 2011-11-11 16:46:38,485 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\Lite\bin\Lite.dll.config 2011-11-11 16:46:39,780 [10] DEBUG eBMsheuTZBd5s8ouhU.eLmj1LZaowJ13vNcFy - Reached license monitor. 2011-11-11 16:46:53,150 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain LiteLobby , LiteLobby 2011-11-11 16:46:53,152 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:46:53,154 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = LiteLobby;LiteLobby\bin;bin_Win64;Shared 2011-11-11 16:46:53,156 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\LiteLobby\bin\LiteLobby.dll.config 2011-11-11 16:47:07,625 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain MmoDemo , Photon.MmoDemo.Server 2011-11-11 16:47:07,628 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:47:07,629 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = MmoDemo;MmoDemo\bin;bin_Win64;Shared 2011-11-11 16:47:07,631 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\MmoDemo\bin\Photon.MmoDemo.Server.dll.config 2011-11-11 16:47:22,120 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain LiteWebSockets , Lite 2011-11-11 16:47:22,124 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:47:22,129 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = LiteWebSockets;LiteWebSockets\bin;bin_Win64;Shared 2011-11-11 16:47:22,132 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\LiteWebSockets\bin\Lite.dll.config 2011-11-11 16:47:36,642 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain CounterPublisher , CounterPublisher 2011-11-11 16:47:36,644 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:47:36,646 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = CounterPublisher;CounterPublisher\bin;bin_Win64;Shared 2011-11-11 16:47:36,648 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\CounterPublisher\bin\CounterPublisher.dll.config 2011-11-11 16:47:51,472 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain Policy , Policy.Application 2011-11-11 16:47:51,474 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:47:51,476 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = Policy;Policy\bin;bin_Win64;Shared 2011-11-11 16:47:51,477 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\Policy\bin\Policy.Application.dll.config 2011-11-11 16:48:05,870 [ 1] INFO PhotonHostRuntime.PhotonDomainManager - CreateAppDomain PhotonIntro , PhotonIntro 2011-11-11 16:48:05,871 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ApplicationBase = C:\Users\Austin\Desktop\server\deploy 2011-11-11 16:48:05,873 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: PrivateBinPath = PhotonIntro;PhotonIntro\bin;bin_Win64;Shared 2011-11-11 16:48:05,877 [ 1] DEBUG PhotonHostRuntime.PhotonDomainManager - CreateAppDomain: ConfigurationFile = C:\Users\Austin\Desktop\server\deploy\PhotonIntro\bin\PhotonIntro.dll.config
Photon Instance 1
2332: 16:46:17.678 - --- 2332: 16:46:17.678 - Service: "Photon Socket Server" starting 2332: 16:46:17.679 - Config File: C:\Users\Austin\Desktop\server\deploy\bin_Win64\PhotonServer.config 2332: 16:46:17.693 - Will produce at most: 10 crash dumps 3212: 16:46:17.712 - Server Starting... 3212: 16:46:17.713 - Photon Version: 3.0.6.801 3212: 16:46:17.713 - Current directory is: C:\Windows\system32 3212: 16:46:17.713 - Changing current directory to: C:\Users\Austin\Desktop\server\deploy\bin_Win64 3212: 16:46:17.715 - Config File: C:\Users\Austin\Desktop\server\deploy\bin_Win64\PhotonServer.config 3212: 16:46:17.733 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them. 3212: 16:46:17.840 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Culture=neutral, PublicKeyToken=02C301B61B060C4D 3212: 16:46:17.953 - About to load CLR - versions available: 3212: 16:46:17.954 - v2.0.50727 3212: 16:46:17.954 - v4.0.30319 3212: 16:46:17.954 - No preference in configuration file, will load latest. 3212: 16:46:17.954 - About to load version: "v4.0.30319" 3212: 16:46:17.971 - Loaded version: "v4.0.30319" 3212: 16:46:33.612 - Photon host runtime loaded 3212: 16:46:38.359 - License is valid. 3212: 16:46:38.359 - Licensed for 100 concurrent connections. 3212: 16:46:38.362 - Max Reliable Data In Transit (awaiting ACKs) per peer : 16384 bytes 3212: 16:46:38.362 - Per peer bandwidth limit 3212: 16:46:38.362 - Transmit Rate Limit: 128 KB/Sec 3212: 16:46:38.362 - Limit period: 250ms 3212: 16:46:38.363 - Limit per period: 32768 bytes 3212: 16:46:38.363 - Max queued data for transmission per peer: 65536 bytes 3212: 16:46:38.363 - Minimum retransmit timeout: 200 3212: 16:46:38.363 - Minimum ENet timeout: 5000ms 3212: 16:46:38.363 - Maximum ENet timeout: 30000ms 3212: 16:46:38.364 - ENetHost: Using Timer Wheel 3212: 16:46:38.364 - About to load application: Lite from Lite 3212: 16:46:38.365 - Auto restart is enabled for application 3212: 16:46:38.365 - Application will restart 10000ms after the last change detected 3212: 16:46:38.365 - Application will restart if files matching the following are changed: "dll;config" 3212: 16:46:38.365 - Application will NOT restart if files matching the following are changed: "log4net.config" 3212: 16:46:53.150 - Application: "Lite" started in app domain: 2 3212: 16:46:53.150 - About to load application: LiteLobby from LiteLobby 3212: 16:46:53.150 - Auto restart is enabled for application 3212: 16:46:53.150 - Application will restart 10000ms after the last change detected 3212: 16:46:53.150 - Application will restart if files matching the following are changed: "dll;config" 3212: 16:46:53.150 - Application will NOT restart if files matching the following are changed: "log4net.config" 3212: 16:47:07.624 - Application: "LiteLobby" started in app domain: 3 3212: 16:47:07.625 - About to load application: MmoDemo from Photon.MmoDemo.Server 3212: 16:47:07.625 - Auto restart is enabled for application 3212: 16:47:07.625 - Application will restart 10000ms after the last change detected 3212: 16:47:07.625 - Application will restart if files matching the following are changed: "dll;config" 3212: 16:47:07.625 - Application will NOT restart if files matching the following are changed: "log4net.config" 3212: 16:47:22.120 - Application: "MmoDemo" started in app domain: 4 3212: 16:47:22.120 - About to load application: LiteWebSockets from Lite 3212: 16:47:36.641 - Application: "LiteWebSockets" started in app domain: 5 3212: 16:47:36.641 - About to load application: CounterPublisher from CounterPublisher 3212: 16:47:36.642 - Auto restart is enabled for application 3212: 16:47:36.642 - Application will restart 10000ms after the last change detected 3212: 16:47:36.642 - Application will restart if files matching the following are changed: "dll;config" 3212: 16:47:36.642 - Application will NOT restart if files matching the following are changed: "log4net.config" 3212: 16:47:51.472 - Application: "CounterPublisher" started in app domain: 6 3212: 16:47:51.472 - About to load application: Policy from Policy.Application 3212: 16:48:05.869 - Application: "Policy" started in app domain: 7 3212: 16:48:05.869 - About to load application: PhotonIntro from PhotonIntro 3212: 16:48:05.869 - Auto restart is enabled for application 3212: 16:48:05.869 - Application will restart 10000ms after the last change detected 3212: 16:48:05.869 - Application will restart if files matching the following are changed: "dll;config" 3212: 16:48:05.869 - Application will NOT restart if files matching the following are changed: "log4net.config" 3212: 16:48:20.096 - Application: "PhotonIntro" started in app domain: 8 3212: 16:48:20.100 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150 3212: 16:48:20.100 - Nagle disabled 3212: 16:48:20.100 - TCP inactivity timeout: 5000ms 3212: 16:48:20.100 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address 3212: 16:48:20.104 - Adding UDP listener on :192.168.56.1: 5055 with a listen backlog of: 500 3212: 16:48:20.104 - Adding UDP listener on :192.20.24.103: 5055 with a listen backlog of: 500 3212: 16:48:20.104 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500 3212: 16:48:20.105 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy" 3212: 16:48:20.105 - TCP inactivity timeout: 5000ms 3212: 16:48:20.106 - Adding TCP Policy listener on :0.0.0.0: 943 with a listen backlog of: 150 and routing to application: "Policy" 3212: 16:48:20.106 - TCP inactivity timeout: 5000ms 3212: 16:48:20.107 - Adding WebSocket TCP listener on :0.0.0.0: 9090 with a listen backlog of: 150 3212: 16:48:20.107 - Nagle disabled 3212: 16:48:20.107 - TCP inactivity timeout: 100000ms 3212: 16:48:20.107 - Forcing all applications ids to: "LiteWebSockets" 3212: 16:48:33.759 - Service is running...
0
Comments
-
ALRIGHT! New morning new results...
Good News: I spent about 5 hours pulling the hair out of my head over a simple issue like this!
Bad News: I woke up this morning opened up my server folder and all the log files were there!
I guess the log files are stored in %photondirectory%\deploy\log and not in the individual application folders. Opened them right up and everything I was hoping for was there
Thanks0 -
Hi aumudin, I am glad that you problem has been solved, and I am sad that my problem which is exactly like yours still exists. I checked the %phonton%\deploy\log directory, but still no log exists except the ones created by the default servers. Does anybody knows what's wrong here? Any common mistake that is easy to ignore?
Thanks0 -
I found the problem...It is because of a small typo in the "log4net.config" file. I checked it many times, but I don't know why it is ignored. But I think it is still a problem, wouldn't there be any warning or hint in the photon log if the xml file has some format error?
Anyway, hope it helps to other people..0 -
I'm glad you found that typo.
Probably we can't log a lot, if the config for logging is wrong but we will look into it. There might be a default location for logging files in log4net.0 -
Tobias wrote:I'm glad you found that typo.
Probably we can't log a lot, if the config for logging is wrong but we will look into it. There might be a default location for logging files in log4net.0