aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Storage
diff options
context:
space:
mode:
authorAdam Frisby2007-06-20 15:50:06 +0000
committerAdam Frisby2007-06-20 15:50:06 +0000
commit29053589bff370916f4067dade70969499f77ce3 (patch)
tree582e2c839ce2e681dc98087bb12c71241641ffc6 /OpenSim/OpenSim.Storage
parent* Removed ClientThreads from avatar (diff)
downloadopensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.zip
opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.gz
opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.bz2
opensim-SC_OLD-29053589bff370916f4067dade70969499f77ce3.tar.xz
* Replaced old logging mechanism with new shiny logging mechanism
* Console, I bid thee farewall. Use "Log" now where console used to exist.
Diffstat (limited to 'OpenSim/OpenSim.Storage')
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs32
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs12
2 files changed, 22 insertions, 22 deletions
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 93f55d6..a6c2872 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -53,18 +53,18 @@ namespace OpenSim.Storage.LocalStorageDb4o
53 53
54 public void Initialise(string dfile) 54 public void Initialise(string dfile)
55 { 55 {
56 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage Opening " + dfile); 56 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile);
57 datastore = dfile; 57 datastore = dfile;
58 try 58 try
59 { 59 {
60 db = Db4oFactory.OpenFile(datastore); 60 db = Db4oFactory.OpenFile(datastore);
61 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage creation"); 61 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage creation");
62 } 62 }
63 catch (Exception e) 63 catch (Exception e)
64 { 64 {
65 db.Close(); 65 db.Close();
66 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); 66 OpenSim.Framework.Console.MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured");
67 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 67 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
68 } 68 }
69 } 69 }
70 70
@@ -123,7 +123,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
123 public void LoadPrimitives(ILocalStorageReceiver receiver) 123 public void LoadPrimitives(ILocalStorageReceiver receiver)
124 { 124 {
125 IObjectSet result = db.Get(typeof(PrimData)); 125 IObjectSet result = db.Get(typeof(PrimData));
126 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); 126 OpenSim.Framework.Console.MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count);
127 foreach (PrimData prim in result) 127 foreach (PrimData prim in result)
128 { 128 {
129 receiver.PrimFromStorage(prim); 129 receiver.PrimFromStorage(prim);
@@ -132,13 +132,13 @@ namespace OpenSim.Storage.LocalStorageDb4o
132 132
133 public float[] LoadWorld() 133 public float[] LoadWorld()
134 { 134 {
135 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Loading world...."); 135 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Loading world....");
136 float[] heightmap = null; 136 float[] heightmap = null;
137 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); 137 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB");
138 IObjectSet world_result = db.Get(typeof(MapStorage)); 138 IObjectSet world_result = db.Get(typeof(MapStorage));
139 if (world_result.Count > 0) 139 if (world_result.Count > 0)
140 { 140 {
141 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); 141 OpenSim.Framework.Console.MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading");
142 MapStorage map = (MapStorage)world_result.Next(); 142 MapStorage map = (MapStorage)world_result.Next();
143 //blank.LandMap = map.Map; 143 //blank.LandMap = map.Map;
144 heightmap = map.Map; 144 heightmap = map.Map;
@@ -151,7 +151,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
151 IObjectSet world_result = db.Get(typeof(MapStorage)); 151 IObjectSet world_result = db.Get(typeof(MapStorage));
152 if (world_result.Count > 0) 152 if (world_result.Count > 0)
153 { 153 {
154 OpenSim.Framework.Console.MainConsole.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); 154 OpenSim.Framework.Console.MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database");
155 MapStorage map = (MapStorage)world_result.Next(); 155 MapStorage map = (MapStorage)world_result.Next();
156 db.Delete(map); 156 db.Delete(map);
157 } 157 }
@@ -209,7 +209,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
209 209
210 public void SaveParcels(ParcelData[] parcel_data) 210 public void SaveParcels(ParcelData[] parcel_data)
211 { 211 {
212 MainConsole.Instance.Notice("Parcel Backup: Saving Parcels..."); 212 MainLog.Instance.Notice("Parcel Backup: Saving Parcels...");
213 int i; 213 int i;
214 for (i = 0; i < parcel_data.GetLength(0); i++) 214 for (i = 0; i < parcel_data.GetLength(0); i++)
215 { 215 {
@@ -217,7 +217,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
217 SaveParcel(parcel_data[i]); 217 SaveParcel(parcel_data[i]);
218 218
219 } 219 }
220 MainConsole.Instance.Notice("Parcel Backup: Parcel Save Complete"); 220 MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete");
221 } 221 }
222 222
223 public void RemoveParcel(ParcelData parcel) 223 public void RemoveParcel(ParcelData parcel)
@@ -231,7 +231,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
231 } 231 }
232 public void RemoveAllParcels() 232 public void RemoveAllParcels()
233 { 233 {
234 MainConsole.Instance.Notice("Parcel Backup: Removing all parcels..."); 234 MainLog.Instance.Notice("Parcel Backup: Removing all parcels...");
235 IObjectSet result = db.Get(typeof(ParcelData)); 235 IObjectSet result = db.Get(typeof(ParcelData));
236 if (result.Count > 0) 236 if (result.Count > 0)
237 { 237 {
@@ -244,11 +244,11 @@ namespace OpenSim.Storage.LocalStorageDb4o
244 244
245 public void LoadParcels(ILocalStorageParcelReceiver recv) 245 public void LoadParcels(ILocalStorageParcelReceiver recv)
246 { 246 {
247 MainConsole.Instance.Notice("Parcel Backup: Loading Parcels..."); 247 MainLog.Instance.Notice("Parcel Backup: Loading Parcels...");
248 IObjectSet result = db.Get(typeof(ParcelData)); 248 IObjectSet result = db.Get(typeof(ParcelData));
249 if (result.Count > 0) 249 if (result.Count > 0)
250 { 250 {
251 MainConsole.Instance.Notice("Parcel Backup: Parcels exist in database."); 251 MainLog.Instance.Notice("Parcel Backup: Parcels exist in database.");
252 foreach (ParcelData parcelData in result) 252 foreach (ParcelData parcelData in result)
253 { 253 {
254 254
@@ -257,10 +257,10 @@ namespace OpenSim.Storage.LocalStorageDb4o
257 } 257 }
258 else 258 else
259 { 259 {
260 MainConsole.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); 260 MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel.");
261 recv.NoParcelDataFromStorage(); 261 recv.NoParcelDataFromStorage();
262 } 262 }
263 MainConsole.Instance.Notice("Parcel Backup: Parcels Restored"); 263 MainLog.Instance.Notice("Parcel Backup: Parcels Restored");
264 } 264 }
265 public void ShutDown() 265 public void ShutDown()
266 { 266 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
index ee8b9ff..fa1abc8 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ b/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
@@ -54,8 +54,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
54 catch (Exception e) 54 catch (Exception e)
55 { 55 {
56 db.Close(); 56 db.Close();
57 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); 57 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured");
58 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 58 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
59 } 59 }
60 } 60 }
61 61
@@ -117,8 +117,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
117 } 117 }
118 catch (Exception e) 118 catch (Exception e)
119 { 119 {
120 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); 120 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured");
121 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 121 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
122 } 122 }
123 123
124 cmd.Dispose(); 124 cmd.Dispose();
@@ -144,8 +144,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
144 } 144 }
145 catch (Exception e) 145 catch (Exception e)
146 { 146 {
147 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); 147 OpenSim.Framework.Console.MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured");
148 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString()); 148 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
149 } 149 }
150 150
151 cmd.Dispose(); 151 cmd.Dispose();