public static void Initialize() { if (logger != null) { logger.Close(); } //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"), // String.Format("{0}.log", typeof(DbHelper).FullName)); logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"), String.Format("{0}.log", typeof(DbHelper).FullName)); locker = new object(); try { GFXDServerMgr.Initialize(); DbDefault.CreateDB(String.Empty, DbCreateType.Replicate); } catch (Exception e) { Log(GetExceptionDetails(e, new StringBuilder()).ToString()); throw new Exception( "Encountered exception in Helper.Initialize(). Check log for detail."); } }
public static void Initialize() { LoadConfig(); if (!startServer) { return; } if (logger != null) { logger.Close(); } logger = new Logger.Logger(logDir, typeof(GFXDServerMgr).FullName + ".log"); locator = new GFXDLocator(); locator.Start(); try { for (int i = 0; i < numServers; i++) { GFXDServer server = new GFXDServer(locator); server.Start(); AddServer(server); } } catch (Exception e) { Log(DbHelper.GetExceptionDetails(e, new StringBuilder()).ToString()); } }
public GFXDLocator() { LoadConfig(); if (logger != null) { logger.Close(); } logger = new Logger.Logger(logDir, String.Format("{0}.log", typeof(GFXDLocator).FullName)); locatorDir = string.Format(@"{0}\{1}", installPath, defaultDir); LocatorState = GFXDState.STOPPED; }
public GFXDTest() //: this(new ManualResetEvent(false)) { if (logger != null) { logger.Close(); } //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"), // this.GetType().FullName + ".log"); logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"), this.GetType().FullName + ".log"); Start(); }
public GFXDTestRunner() { this.resetEvent = new ManualResetEvent(false); this.runContinuously = false; this.interrupted = false; if (logger != null) { logger.Close(); } //logger = new Logger.Logger(GFXDConfigManager.GetClientSetting("logDir"), // typeof(GFXDTestRunner).FullName + ".log"); logger = new Logger.Logger(Environment.GetEnvironmentVariable("GFXDADOOUTDIR"), typeof(GFXDTestRunner).FullName + ".log"); }
public GFXDServer() { LoadConfig(); if (logger != null) { logger.Close(); } logger = new Logger.Logger(logDir, String.Format("{0}.log", typeof(GFXDServer).FullName)); if (numServers == 1) { mcastPort = 0; } clientBindAddress = defaultClientBindAddress; clientPort = defaultClientPort + (serverCount++); ServerName = string.Format("{0}{1}", defaultServerDir, serverCount); serverDir = string.Format(@"{0}\{1}", installPath, ServerName); this.ServerState = GFXDState.STOPPED; }