aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Grid/GridServer.Config/DbGridConfig.cs
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Grid/GridServer.Config/DbGridConfig.cs')
-rw-r--r--OpenSim/Grid/GridServer.Config/DbGridConfig.cs54
1 files changed, 28 insertions, 26 deletions
diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
index e8225e1..5dde43d 100644
--- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
+++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
@@ -38,13 +38,15 @@ namespace OpenGrid.Config.GridConfigDb4o
38 /// </summary> 38 /// </summary>
39 public class Db40ConfigPlugin: IGridConfig 39 public class Db40ConfigPlugin: IGridConfig
40 { 40 {
41 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42
41 /// <summary> 43 /// <summary>
42 /// Loads and returns a configuration objeect 44 /// Loads and returns a configuration objeect
43 /// </summary> 45 /// </summary>
44 /// <returns>A grid configuration object</returns> 46 /// <returns>A grid configuration object</returns>
45 public GridConfig GetConfigObject() 47 public GridConfig GetConfigObject()
46 { 48 {
47 MainLog.Instance.Verbose("DBGRIDCONFIG", "Loading Db40Config dll"); 49 m_log.Info("[DBGRIDCONFIG]: Loading Db40Config dll");
48 return new DbGridConfig(); 50 return new DbGridConfig();
49 } 51 }
50 } 52 }
@@ -64,24 +66,24 @@ namespace OpenGrid.Config.GridConfigDb4o
64 /// </summary> 66 /// </summary>
65 public void LoadDefaults() 67 public void LoadDefaults()
66 { 68 {
67 MainLog.Instance.Notice("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); 69 MainConsole.Instance.Info("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
68 70
69 // About the grid options 71 // About the grid options
70 this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); 72 this.GridOwner = MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
71 73
72 // Asset Options 74 // Asset Options
73 this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"); 75 this.DefaultAssetServer = MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/");
74 this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); 76 this.AssetSendKey = MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
75 this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); 77 this.AssetRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
76 78
77 // User Server Options 79 // User Server Options
78 this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/"); 80 this.DefaultUserServer = MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/");
79 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); 81 this.UserSendKey = MainConsole.Instance.CmdPrompt("Key to send to user server","null");
80 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); 82 this.UserRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
81 83
82 // Region Server Options 84 // Region Server Options
83 this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); 85 this.SimSendKey = MainConsole.Instance.CmdPrompt("Key to send to sims","null");
84 this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); 86 this.SimRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from sims","null");
85 } 87 }
86 88
87 /// <summary> 89 /// <summary>
@@ -99,7 +101,7 @@ namespace OpenGrid.Config.GridConfigDb4o
99 // Found? 101 // Found?
100 if (result.Count==1) 102 if (result.Count==1)
101 { 103 {
102 MainLog.Instance.Verbose("DBGRIDCONFIG", "Found a GridConfig object in the local database, loading"); 104 m_log.Info("[DBGRIDCONFIG]: Found a GridConfig object in the local database, loading");
103 foreach (DbGridConfig cfg in result) 105 foreach (DbGridConfig cfg in result)
104 { 106 {
105 // Import each setting into this class 107 // Import each setting into this class
@@ -121,13 +123,13 @@ namespace OpenGrid.Config.GridConfigDb4o
121 } 123 }
122 else 124 else
123 { 125 {
124 MainLog.Instance.Verbose("DBGRIDCONFIG", "Could not find object in database, loading precompiled defaults"); 126 m_log.Info("[DBGRIDCONFIG]: Could not find object in database, loading precompiled defaults");
125 127
126 // Load default settings into this class 128 // Load default settings into this class
127 LoadDefaults(); 129 LoadDefaults();
128 130
129 // Saves to the database file... 131 // Saves to the database file...
130 MainLog.Instance.Verbose("DBGRIDCONFIG", "Writing out default settings to local database"); 132 m_log.Info("[DBGRIDCONFIG]: Writing out default settings to local database");
131 db.Set(this); 133 db.Set(this);
132 134
133 // Closes file locks 135 // Closes file locks
@@ -136,27 +138,27 @@ namespace OpenGrid.Config.GridConfigDb4o
136 } 138 }
137 catch(Exception e) 139 catch(Exception e)
138 { 140 {
139 MainLog.Instance.Warn("DbGridConfig.cs:InitConfig() - Exception occured"); 141 m_log.Warn("DbGridConfig.cs:InitConfig() - Exception occured");
140 MainLog.Instance.Warn(e.ToString()); 142 m_log.Warn(e.ToString());
141 } 143 }
142 144
143 // Grid Settings 145 // Grid Settings
144 MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid settings loaded:"); 146 m_log.Info("[DBGRIDCONFIG]: Grid settings loaded:");
145 MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid owner: " + this.GridOwner); 147 m_log.Info("[DBGRIDCONFIG]: Grid owner: " + this.GridOwner);
146 148
147 // Asset Settings 149 // Asset Settings
148 MainLog.Instance.Verbose("DBGRIDCONFIG", "Default asset server: " + this.DefaultAssetServer); 150 m_log.Info("[DBGRIDCONFIG]: Default asset server: " + this.DefaultAssetServer);
149 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to asset server: " + this.AssetSendKey); 151 m_log.Info("[DBGRIDCONFIG]: Key to send to asset server: " + this.AssetSendKey);
150 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from asset server: " + this.AssetRecvKey); 152 m_log.Info("[DBGRIDCONFIG]: Key to expect from asset server: " + this.AssetRecvKey);
151 153
152 // User Settings 154 // User Settings
153 MainLog.Instance.Verbose("DBGRIDCONFIG", "Default user server: " + this.DefaultUserServer); 155 m_log.Info("[DBGRIDCONFIG]: Default user server: " + this.DefaultUserServer);
154 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to user server: " + this.UserSendKey); 156 m_log.Info("[DBGRIDCONFIG]: Key to send to user server: " + this.UserSendKey);
155 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from user server: " + this.UserRecvKey); 157 m_log.Info("[DBGRIDCONFIG]: Key to expect from user server: " + this.UserRecvKey);
156 158
157 // Region Settings 159 // Region Settings
158 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to sims: " + this.SimSendKey); 160 m_log.Info("[DBGRIDCONFIG]: Key to send to sims: " + this.SimSendKey);
159 MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from sims: " + this.SimRecvKey); 161 m_log.Info("[DBGRIDCONFIG]: Key to expect from sims: " + this.SimRecvKey);
160 } 162 }
161 163
162 /// <summary> 164 /// <summary>