aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer.Config/DbUserConfig.cs')
-rw-r--r--OpenSim/Grid/UserServer.Config/DbUserConfig.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
index d2736c6..865dfea 100644
--- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
+++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
@@ -35,9 +35,11 @@ namespace OpenUser.Config.UserConfigDb4o
35{ 35{
36 public class Db4oConfigPlugin: IUserConfig 36 public class Db4oConfigPlugin: IUserConfig
37 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
38 public UserConfig GetConfigObject() 40 public UserConfig GetConfigObject()
39 { 41 {
40 MainLog.Instance.Verbose("DBUSERCONFIG", "Loading Db40Config dll"); 42 m_log.Info("[DBUSERCONFIG]: Loading Db40Config dll");
41 return ( new DbUserConfig()); 43 return ( new DbUserConfig());
42 } 44 }
43 } 45 }
@@ -48,13 +50,13 @@ namespace OpenUser.Config.UserConfigDb4o
48 50
49 public void LoadDefaults() 51 public void LoadDefaults()
50 { 52 {
51 MainLog.Instance.Notice("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); 53 m_log.Info("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
52 54
53 this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); 55 this.DefaultStartupMsg = m_log.CmdPrompt("Default startup message", "Welcome to OGS");
54 56
55 this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/"); 57 this.GridServerURL = m_log.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/");
56 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); 58 this.GridSendKey = m_log.CmdPrompt("Key to send to grid server","null");
57 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); 59 this.GridRecvKey = m_log.CmdPrompt("Key to expect from grid server","null");
58 } 60 }
59 61
60 public override void InitConfig() 62 public override void InitConfig()
@@ -65,7 +67,7 @@ namespace OpenUser.Config.UserConfigDb4o
65 IObjectSet result = db.Get(typeof(DbUserConfig)); 67 IObjectSet result = db.Get(typeof(DbUserConfig));
66 if(result.Count==1) 68 if(result.Count==1)
67 { 69 {
68 MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); 70 m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading");
69 foreach (DbUserConfig cfg in result) 71 foreach (DbUserConfig cfg in result)
70 { 72 {
71 this.GridServerURL=cfg.GridServerURL; 73 this.GridServerURL=cfg.GridServerURL;
@@ -76,24 +78,24 @@ namespace OpenUser.Config.UserConfigDb4o
76 } 78 }
77 else 79 else
78 { 80 {
79 MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); 81 m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
80 LoadDefaults(); 82 LoadDefaults();
81 MainLog.Instance.Verbose("DBUSERCONFIG", "Writing out default settings to local database"); 83 m_log.Info("[DBUSERCONFIG]: Writing out default settings to local database");
82 db.Set(this); 84 db.Set(this);
83 db.Close(); 85 db.Close();
84 } 86 }
85 } 87 }
86 catch(Exception e) 88 catch(Exception e)
87 { 89 {
88 MainLog.Instance.Warn("DbUserConfig.cs:InitConfig() - Exception occured"); 90 m_log.Warn("DbUserConfig.cs:InitConfig() - Exception occured");
89 MainLog.Instance.Warn(e.ToString()); 91 m_log.Warn(e.ToString());
90 } 92 }
91 93
92 MainLog.Instance.Verbose("DBUSERCONFIG", "User settings loaded:"); 94 m_log.Info("[DBUSERCONFIG]: User settings loaded:");
93 MainLog.Instance.Verbose("DBUSERCONFIG", "Default startup message: " + this.DefaultStartupMsg); 95 m_log.Info("[DBUSERCONFIG]: Default startup message: " + this.DefaultStartupMsg);
94 MainLog.Instance.Verbose("DBUSERCONFIG", "Grid server URL: " + this.GridServerURL); 96 m_log.Info("[DBUSERCONFIG]: Grid server URL: " + this.GridServerURL);
95 MainLog.Instance.Verbose("DBUSERCONFIG", "Key to send to grid: " + this.GridSendKey); 97 m_log.Info("[DBUSERCONFIG]: Key to send to grid: " + this.GridSendKey);
96 MainLog.Instance.Verbose("DBUSERCONFIG", "Key to expect from grid: " + this.GridRecvKey); 98 m_log.Info("[DBUSERCONFIG]: Key to expect from grid: " + this.GridRecvKey);
97 } 99 }
98 100
99 public void Shutdown() 101 public void Shutdown()