protected virtual void Application_Start(Object sender, EventArgs e) { Started = DateTime.Now; // Init log system if (String.Compare(Environment.GetEnvironmentVariable("GBRAINY_DEBUG"), "false", false) != 0) { Logger.LogLevel = Level.DEBUG; Logger.LogDevice = new FileLogger(); } else { Logger.LogLevel = Level.INFO; Logger.LogDevice = new ConsoleLogger(); } // Register services DefaultServices services = new DefaultServices(); services.RemoveService <ITranslations> (); services.RegisterServices(); ServiceLocator.Instance.RegisterService <ITranslations> (new TranslationsWeb()); ThemeManager.ConfigPath = Defines.THEMES_DIR; // Configuration ServiceLocator.Instance.GetService <IConfiguration> ().Set(ConfigurationKeys.GamesGraphics, "images/"); ServiceLocator.Instance.GetService <IConfiguration> ().Set(ConfigurationKeys.AssembliesDir, "bin/"); Logger.Info("Global.Application_Start.gbrainy web starting"); }
protected virtual void Application_Start(Object sender, EventArgs e) { Started = DateTime.Now; // Init log system if (String.Compare (Environment.GetEnvironmentVariable ("GBRAINY_DEBUG"), "false", false) != 0) { Logger.LogLevel = Level.DEBUG; Logger.LogDevice = new FileLogger (); } else { Logger.LogLevel = Level.INFO; Logger.LogDevice = new ConsoleLogger (); } // Register services DefaultServices services = new DefaultServices (); services.RemoveService <ITranslations> (); services.RegisterServices (); ServiceLocator.Instance.RegisterService <ITranslations> (new TranslationsWeb ()); ThemeManager.ConfigPath = Defines.THEMES_DIR; // Configuration ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.GamesGraphics, "images/"); ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.AssembliesDir, "bin/"); Logger.Info ("Global.Application_Start.gbrainy web starting"); }