aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/AssetConfig.cs1
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs18
-rw-r--r--OpenSim/Framework/ClientManager.cs11
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs21
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServer.cs8
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs18
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs18
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs38
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs13
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs26
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs38
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs12
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs24
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs14
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs44
-rw-r--r--OpenSim/Framework/Communications/RestClient/RestClient.cs14
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs49
-rw-r--r--OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs4
-rw-r--r--OpenSim/Framework/ConfigurationMember.cs52
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs (renamed from OpenSim/Framework/Console/LogBase.cs)154
-rw-r--r--OpenSim/Framework/Console/MainConsole.cs (renamed from OpenSim/Framework/Console/MainLog.cs)7
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oUserData.cs12
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs6
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs6
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs34
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLManager.cs16
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs26
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLAssetData.cs18
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs74
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLGridData.cs14
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs34
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLManager.cs18
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs28
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs12
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs14
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs4
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs78
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs18
-rw-r--r--OpenSim/Framework/Data/Properties/AssemblyInfo.cs2
-rw-r--r--OpenSim/Framework/EstateSettings.cs7
-rw-r--r--OpenSim/Framework/GridConfig.cs1
-rw-r--r--OpenSim/Framework/InventoryConfig.cs2
-rw-r--r--OpenSim/Framework/MessageServerConfig.cs1
-rw-r--r--OpenSim/Framework/RegionInfo.cs5
-rw-r--r--OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs17
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs30
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs12
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs4
-rw-r--r--OpenSim/Framework/UserConfig.cs1
50 files changed, 523 insertions, 557 deletions
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs
index 1507d67..60c9024 100644
--- a/OpenSim/Framework/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssemblyInfo.cs
@@ -61,4 +61,4 @@ using System.Runtime.InteropServices;
61// 61//
62 62
63[assembly : AssemblyVersion("1.0.0.0")] 63[assembly : AssemblyVersion("1.0.0.0")]
64[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file 64[assembly : AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/AssetConfig.cs b/OpenSim/Framework/AssetConfig.cs
index 9989bfd..a83981a 100644
--- a/OpenSim/Framework/AssetConfig.cs
+++ b/OpenSim/Framework/AssetConfig.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28 28
29using System; 29using System;
30using OpenSim.Framework.Console;
30 31
31namespace OpenSim.Framework 32namespace OpenSim.Framework
32{ 33{
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 59db3d6..9026331 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
44{ 44{
45 public class AssetLoaderFileSystem : IAssetLoader 45 public class AssetLoaderFileSystem : IAssetLoader
46 { 46 {
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
48
47 protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) 49 protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
48 { 50 {
49 AssetBase asset = new AssetBase( 51 AssetBase asset = new AssetBase(
@@ -53,13 +55,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
53 55
54 if (!String.IsNullOrEmpty(path)) 56 if (!String.IsNullOrEmpty(path))
55 { 57 {
56 MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, path); 58 m_log.Info(String.Format("[ASSETS]: Loading: [{0}][{1}]", name, path));
57 59
58 LoadAsset(asset, isImage, path); 60 LoadAsset(asset, isImage, path);
59 } 61 }
60 else 62 else
61 { 63 {
62 MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name); 64 m_log.Info(String.Format("[ASSETS]: Instantiated: [{0}]", name));
63 } 65 }
64 66
65 return asset; 67 return asset;
@@ -106,14 +108,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
106 } 108 }
107 catch (XmlException e) 109 catch (XmlException e)
108 { 110 {
109 MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e); 111 m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
110 } 112 }
111 } 113 }
112 else 114 else
113 { 115 {
114 MainLog.Instance.Error( 116 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
115 "ASSETS",
116 "Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
117 } 117 }
118 118
119 assets.ForEach(action); 119 assets.ForEach(action);
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
126 /// <param name="assets"></param> 126 /// <param name="assets"></param>
127 protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) 127 protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
128 { 128 {
129 MainLog.Instance.Verbose("ASSETS", "Loading asset set {0}", assetSetPath); 129 m_log.Info(String.Format("[ASSETS]: Loading asset set {0}", assetSetPath));
130 130
131 if (File.Exists(assetSetPath)) 131 if (File.Exists(assetSetPath))
132 { 132 {
@@ -152,12 +152,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
152 } 152 }
153 catch (XmlException e) 153 catch (XmlException e)
154 { 154 {
155 MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e); 155 m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
156 } 156 }
157 } 157 }
158 else 158 else
159 { 159 {
160 MainLog.Instance.Error("ASSETS", "Asset set file {0} does not exist!", assetSetPath); 160 m_log.Error(String.Format("[ASSETS]: Asset set file {0} does not exist!", assetSetPath));
161 } 161 }
162 } 162 }
163 } 163 }
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index de7708c..8422c17 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -36,11 +36,12 @@ namespace OpenSim.Framework
36 36
37 public class ClientManager 37 public class ClientManager
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 private Dictionary<uint, IClientAPI> m_clients; 41 private Dictionary<uint, IClientAPI> m_clients;
40 42
41 public void ForEachClient(ForEachClientDelegate whatToDo) 43 public void ForEachClient(ForEachClientDelegate whatToDo)
42 { 44 {
43
44 // Wasteful, I know 45 // Wasteful, I know
45 IClientAPI[] LocalClients = new IClientAPI[0]; 46 IClientAPI[] LocalClients = new IClientAPI[0];
46 lock (m_clients) 47 lock (m_clients)
@@ -57,7 +58,7 @@ namespace OpenSim.Framework
57 } 58 }
58 catch (System.Exception e) 59 catch (System.Exception e)
59 { 60 {
60 OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString()); 61 m_log.Warn("[CLIENT]: Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString());
61 } 62 }
62 } 63 }
63 } 64 }
@@ -116,11 +117,9 @@ namespace OpenSim.Framework
116 } 117 }
117 catch (System.Exception e) 118 catch (System.Exception e)
118 { 119 {
119 OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", string.Format("Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e)); 120 m_log.Error(string.Format("[CLIENT]: Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e));
120 } 121 }
121 } 122 }
122
123
124 } 123 }
125 124
126 private uint[] GetAllCircuits(LLUUID agentId) 125 private uint[] GetAllCircuits(LLUUID agentId)
@@ -134,7 +133,6 @@ namespace OpenSim.Framework
134 m_clients.Values.CopyTo(LocalClients, 0); 133 m_clients.Values.CopyTo(LocalClients, 0);
135 } 134 }
136 135
137
138 for (int i = 0; i < LocalClients.Length; i++ ) 136 for (int i = 0; i < LocalClients.Length; i++ )
139 { 137 {
140 if (LocalClients[i].AgentId == agentId) 138 if (LocalClients[i].AgentId == agentId)
@@ -160,7 +158,6 @@ namespace OpenSim.Framework
160 m_clients.Values.CopyTo(LocalClients, 0); 158 m_clients.Values.CopyTo(LocalClients, 0);
161 } 159 }
162 160
163
164 for (int i = 0; i < LocalClients.Length; i++) 161 for (int i = 0; i < LocalClients.Length; i++)
165 { 162 {
166 if (LocalClients[i].AgentId != sender.AgentId) 163 if (LocalClients[i].AgentId != sender.AgentId)
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index db2d2fe..84713b9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.Communications.Cache
44 /// </summary> 44 /// </summary>
45 public class AssetCache : IAssetReceiver 45 public class AssetCache : IAssetReceiver
46 { 46 {
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
48
47 public Dictionary<LLUUID, AssetInfo> Assets; 49 public Dictionary<LLUUID, AssetInfo> Assets;
48 public Dictionary<LLUUID, TextureImage> Textures; 50 public Dictionary<LLUUID, TextureImage> Textures;
49 51
@@ -61,14 +63,13 @@ namespace OpenSim.Framework.Communications.Cache
61 private readonly IAssetServer m_assetServer; 63 private readonly IAssetServer m_assetServer;
62 64
63 private readonly Thread m_assetCacheThread; 65 private readonly Thread m_assetCacheThread;
64 private readonly LogBase m_log;
65 66
66 /// <summary> 67 /// <summary>
67 /// 68 ///
68 /// </summary> 69 /// </summary>
69 public AssetCache(IAssetServer assetServer, LogBase log) 70 public AssetCache(IAssetServer assetServer)
70 { 71 {
71 log.Verbose("ASSETSTORAGE", "Creating Asset cache"); 72 m_log.Info("[ASSETSTORAGE]: Creating Asset cache");
72 m_assetServer = assetServer; 73 m_assetServer = assetServer;
73 m_assetServer.SetReceiver(this); 74 m_assetServer.SetReceiver(this);
74 Assets = new Dictionary<LLUUID, AssetInfo>(); 75 Assets = new Dictionary<LLUUID, AssetInfo>();
@@ -76,8 +77,6 @@ namespace OpenSim.Framework.Communications.Cache
76 m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); 77 m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
77 m_assetCacheThread.IsBackground = true; 78 m_assetCacheThread.IsBackground = true;
78 m_assetCacheThread.Start(); 79 m_assetCacheThread.Start();
79
80 m_log = log;
81 } 80 }
82 81
83 /// <summary> 82 /// <summary>
@@ -94,7 +93,7 @@ namespace OpenSim.Framework.Communications.Cache
94 } 93 }
95 catch (Exception e) 94 catch (Exception e)
96 { 95 {
97 m_log.Error("ASSETCACHE", e.ToString()); 96 m_log.Error("[ASSETCACHE]: " + e.ToString());
98 } 97 }
99 } 98 }
100 } 99 }
@@ -198,8 +197,8 @@ namespace OpenSim.Framework.Communications.Cache
198 } 197 }
199 } while (--maxPolls > 0); 198 } while (--maxPolls > 0);
200 199
201 MainLog.Instance.Warn( 200 m_log.Warn(
202 "ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached"); 201 String.Format("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached"));
203 202
204 return null; 203 return null;
205 } 204 }
@@ -266,7 +265,7 @@ namespace OpenSim.Framework.Communications.Cache
266 } 265 }
267 } 266 }
268 267
269 m_log.Verbose("ASSETCACHE", "Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); 268 m_log.Info(String.Format("[ASSETCACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result));
270 } 269 }
271 270
272 public void DeleteAsset(LLUUID assetID) 271 public void DeleteAsset(LLUUID assetID)
@@ -362,7 +361,7 @@ namespace OpenSim.Framework.Communications.Cache
362 { 361 {
363 //if (this.RequestedTextures.ContainsKey(assetID)) 362 //if (this.RequestedTextures.ContainsKey(assetID))
364 //{ 363 //{
365 // MainLog.Instance.Warn("ASSET CACHE", "sending image not found for {0}", assetID); 364 // m_log.Warn(String.Format("[ASSET CACHE]: sending image not found for {0}", assetID));
366 // AssetRequest req = this.RequestedTextures[assetID]; 365 // AssetRequest req = this.RequestedTextures[assetID];
367 // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); 366 // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();
368 // notFound.ImageID.ID = assetID; 367 // notFound.ImageID.ID = assetID;
@@ -371,7 +370,7 @@ namespace OpenSim.Framework.Communications.Cache
371 //} 370 //}
372 //else 371 //else
373 //{ 372 //{
374 // MainLog.Instance.Error("ASSET CACHE", "Cound not send image not found for {0}", assetID); 373 // m_log.Error(String.Format("[ASSET CACHE]: Cound not send image not found for {0}", assetID));
375 //} 374 //}
376 } 375 }
377 376
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs
index 575e80a..c1cf100 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache
35{ 35{
36 public class LocalAssetServer : AssetServerBase 36 public class LocalAssetServer : AssetServerBase
37 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
38 private IObjectContainer db; 40 private IObjectContainer db;
39 41
40 public LocalAssetServer() 42 public LocalAssetServer()
@@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
43 yapfile = File.Exists(Path.Combine(Util.dataDir(), "regionassets.yap")); 45 yapfile = File.Exists(Path.Combine(Util.dataDir(), "regionassets.yap"));
44 46
45 db = Db4oFactory.OpenFile(Path.Combine(Util.dataDir(), "regionassets.yap")); 47 db = Db4oFactory.OpenFile(Path.Combine(Util.dataDir(), "regionassets.yap"));
46 MainLog.Instance.Verbose("ASSETS", "Db4 Asset database creation"); 48 m_log.Info("[ASSETS]: Db4 Asset database creation");
47 49
48 if (!yapfile) 50 if (!yapfile)
49 { 51 {
@@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications.Cache
67 69
68 if (db != null) 70 if (db != null)
69 { 71 {
70 MainLog.Instance.Verbose("ASSETSERVER", "Closing local asset server database"); 72 m_log.Info("[ASSETSERVER]: Closing local asset server database");
71 db.Close(); 73 db.Close();
72 } 74 }
73 } 75 }
@@ -120,7 +122,7 @@ namespace OpenSim.Framework.Communications.Cache
120 122
121 protected virtual void SetUpAssetDatabase() 123 protected virtual void SetUpAssetDatabase()
122 { 124 {
123 MainLog.Instance.Verbose("LOCAL ASSET SERVER", "Setting up asset database"); 125 m_log.Info("[LOCAL ASSET SERVER]: Setting up asset database");
124 126
125 base.LoadDefaultAssets(); 127 base.LoadDefaultAssets();
126 } 128 }
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 09f8a0c..1d8f6ba 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Communications.Cache
37{ 37{
38 public abstract class AssetServerBase : IAssetServer 38 public abstract class AssetServerBase : IAssetServer
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 protected IAssetReceiver m_receiver; 42 protected IAssetReceiver m_receiver;
41 protected BlockingQueue<AssetRequest> m_assetRequests; 43 protected BlockingQueue<AssetRequest> m_assetRequests;
42 protected Thread m_localAssetServerThread; 44 protected Thread m_localAssetServerThread;
@@ -68,15 +70,15 @@ namespace OpenSim.Framework.Communications.Cache
68 70
69 if (asset != null) 71 if (asset != null)
70 { 72 {
71 //MainLog.Instance.Verbose( 73 //m_log.Info(
72 // "ASSET", "Asset {0} received from asset server", req.AssetID); 74 // String.Format("[ASSET]: Asset {0} received from asset server", req.AssetID));
73 75
74 m_receiver.AssetReceived(asset, req.IsTexture); 76 m_receiver.AssetReceived(asset, req.IsTexture);
75 } 77 }
76 else 78 else
77 { 79 {
78 MainLog.Instance.Error( 80 m_log.Error(
79 "ASSET", "Asset {0} not found by asset server", req.AssetID); 81 String.Format("[ASSET]: Asset {0} not found by asset server", req.AssetID));
80 82
81 m_receiver.AssetNotFound(req.AssetID); 83 m_receiver.AssetNotFound(req.AssetID);
82 } 84 }
@@ -84,7 +86,7 @@ namespace OpenSim.Framework.Communications.Cache
84 86
85 public virtual void LoadDefaultAssets() 87 public virtual void LoadDefaultAssets()
86 { 88 {
87 MainLog.Instance.Verbose("ASSETSERVER", "Setting up asset database"); 89 m_log.Info("[ASSETSERVER]: Setting up asset database");
88 90
89 assetLoader.ForEachDefaultXmlAsset(StoreAsset); 91 assetLoader.ForEachDefaultXmlAsset(StoreAsset);
90 92
@@ -94,7 +96,7 @@ namespace OpenSim.Framework.Communications.Cache
94 96
95 public AssetServerBase() 97 public AssetServerBase()
96 { 98 {
97 MainLog.Instance.Verbose("ASSETSERVER", "Starting asset storage system"); 99 m_log.Info("[ASSETSERVER]: Starting asset storage system");
98 m_assetRequests = new BlockingQueue<AssetRequest>(); 100 m_assetRequests = new BlockingQueue<AssetRequest>();
99 101
100 m_localAssetServerThread = new Thread(RunRequests); 102 m_localAssetServerThread = new Thread(RunRequests);
@@ -114,7 +116,7 @@ namespace OpenSim.Framework.Communications.Cache
114 } 116 }
115 catch (Exception e) 117 catch (Exception e)
116 { 118 {
117 MainLog.Instance.Error("ASSETSERVER", e.Message); 119 m_log.Error("[ASSETSERVER]: " + e.Message);
118 } 120 }
119 } 121 }
120 } 122 }
@@ -131,7 +133,7 @@ namespace OpenSim.Framework.Communications.Cache
131 req.IsTexture = isTexture; 133 req.IsTexture = isTexture;
132 m_assetRequests.Enqueue(req); 134 m_assetRequests.Enqueue(req);
133 135
134 MainLog.Instance.Verbose("ASSET", "Added {0} to request queue", assetID); 136 m_log.Info(String.Format("[ASSET]: Added {0} to request queue", assetID));
135 } 137 }
136 138
137 public virtual void UpdateAsset(AssetBase asset) 139 public virtual void UpdateAsset(AssetBase asset)
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 2f0727f..48d9ec8 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications.Cache
36{ 36{
37 public class GridAssetClient : AssetServerBase 37 public class GridAssetClient : AssetServerBase
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 private string _assetServerUrl; 41 private string _assetServerUrl;
40 42
41 public GridAssetClient(string serverUrl) 43 public GridAssetClient(string serverUrl)
@@ -50,7 +52,7 @@ namespace OpenSim.Framework.Communications.Cache
50 Stream s = null; 52 Stream s = null;
51 try 53 try
52 { 54 {
53 MainLog.Instance.Debug("ASSETCACHE", "Querying for {0}", req.AssetID.ToString()); 55 m_log.Debug(String.Format("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString()));
54 56
55 RestClient rc = new RestClient(_assetServerUrl); 57 RestClient rc = new RestClient(_assetServerUrl);
56 rc.AddResourcePath("assets"); 58 rc.AddResourcePath("assets");
@@ -70,9 +72,9 @@ namespace OpenSim.Framework.Communications.Cache
70 } 72 }
71 catch (Exception e) 73 catch (Exception e)
72 { 74 {
73 MainLog.Instance.Error("ASSETCACHE", e.Message); 75 m_log.Error("[ASSETCACHE]: " + e.Message);
74 MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); 76 m_log.Debug(String.Format("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString()));
75 MainLog.Instance.Error("ASSETCACHE", e.StackTrace); 77 m_log.Error("[ASSETCACHE]: " + e.StackTrace);
76 } 78 }
77 79
78 return null; 80 return null;
@@ -93,19 +95,19 @@ namespace OpenSim.Framework.Communications.Cache
93 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); 95 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
94 // xs.Serialize(s, asset); 96 // xs.Serialize(s, asset);
95 // RestClient rc = new RestClient(_assetServerUrl); 97 // RestClient rc = new RestClient(_assetServerUrl);
96 MainLog.Instance.Verbose("ASSET", "Storing asset"); 98 m_log.Info("[ASSET]: Storing asset");
97 //rc.AddResourcePath("assets"); 99 //rc.AddResourcePath("assets");
98 100
99 // rc.RequestMethod = "POST"; 101 // rc.RequestMethod = "POST";
100 // rc.Request(s); 102 // rc.Request(s);
101 //MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); 103 //m_log.Info(String.Format("[ASSET]: Stored {0}", rc));
102 MainLog.Instance.Verbose("ASSET", "Sending to " + _assetServerUrl + "/assets/"); 104 m_log.Info("[ASSET]: Sending to " + _assetServerUrl + "/assets/");
103 RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset); 105 RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset);
104 106
105 } 107 }
106 catch (Exception e) 108 catch (Exception e)
107 { 109 {
108 MainLog.Instance.Error("ASSETS", e.Message); 110 m_log.Error("[ASSETS]: " + e.Message);
109 } 111 }
110 } 112 }
111 113
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index ae07898..46767bb 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -26,12 +26,12 @@
26* 26*
27*/ 27*/
28 28
29using System;
29using System.Collections.Generic; 30using System.Collections.Generic;
30using System.IO; 31using System.IO;
31using System.Xml; 32using System.Xml;
32using libsecondlife; 33using libsecondlife;
33using Nini.Config; 34using Nini.Config;
34
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36 36
37namespace OpenSim.Framework.Communications.Cache 37namespace OpenSim.Framework.Communications.Cache
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Communications.Cache
42 /// </summary> 42 /// </summary>
43 public class LibraryRootFolder : InventoryFolderImpl 43 public class LibraryRootFolder : InventoryFolderImpl
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); 47 private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
46 48
47 /// <summary> 49 /// <summary>
@@ -53,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
53 55
54 public LibraryRootFolder() 56 public LibraryRootFolder()
55 { 57 {
56 MainLog.Instance.Verbose("LIBRARYINVENTORY", "Loading library inventory"); 58 m_log.Info("[LIBRARYINVENTORY]: Loading library inventory");
57 59
58 agentID = libOwner; 60 agentID = libOwner;
59 folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); 61 folderID = new LLUUID("00000112-000f-0000-0000-000100bba000");
@@ -138,8 +140,8 @@ namespace OpenSim.Framework.Communications.Cache
138 /// <param name="assets"></param> 140 /// <param name="assets"></param>
139 protected void LoadLibraries(string librariesControlPath) 141 protected void LoadLibraries(string librariesControlPath)
140 { 142 {
141 MainLog.Instance.Verbose( 143 m_log.Info(
142 "LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath); 144 String.Format("LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath));
143 145
144 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); 146 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
145 } 147 }
@@ -186,15 +188,15 @@ namespace OpenSim.Framework.Communications.Cache
186 libraryFolders.Add(folderInfo.folderID, folderInfo); 188 libraryFolders.Add(folderInfo.folderID, folderInfo);
187 parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); 189 parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
188 190
189// MainLog.Instance.Verbose( 191// m_log.Info(
190// "LIBRARYINVENTORY", "Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); 192// String.Format("[LIBRARYINVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID));
191 } 193 }
192 else 194 else
193 { 195 {
194 MainLog.Instance.Warn( 196 m_log.Warn(
195 "LIBRARYINVENTORY", 197 String.Format("[LIBRARYINVENTORY]: " +
196 "Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", 198 "Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!",
197 folderInfo.name, folderInfo.folderID, folderInfo.parentID); 199 folderInfo.name, folderInfo.folderID, folderInfo.parentID));
198 } 200 }
199 } 201 }
200 202
@@ -227,10 +229,10 @@ namespace OpenSim.Framework.Communications.Cache
227 } 229 }
228 else 230 else
229 { 231 {
230 MainLog.Instance.Warn( 232 m_log.Warn(
231 "LIBRARYINVENTORY", 233 String.Format("[LIBRARYINVENTORY]: " +
232 "Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", 234 "Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
233 item.inventoryName, item.inventoryID, item.parentFolderID); 235 item.inventoryName, item.inventoryID, item.parentFolderID));
234 } 236 }
235 } 237 }
236 238
@@ -257,14 +259,14 @@ namespace OpenSim.Framework.Communications.Cache
257 } 259 }
258 catch (XmlException e) 260 catch (XmlException e)
259 { 261 {
260 MainLog.Instance.Error( 262 m_log.Error(
261 "LIBRARYINVENTORY", "Error loading {0} : {1}", path, e); 263 String.Format("[LIBRARYINVENTORY]: Error loading {0} : {1}", path, e));
262 } 264 }
263 } 265 }
264 else 266 else
265 { 267 {
266 MainLog.Instance.Error( 268 m_log.Error(
267 "LIBRARYINVENTORY", "{0} file {1} does not exist!", fileDescription, path); 269 String.Format("[LIBRARYINVENTORY]: {0} file {1} does not exist!", fileDescription, path));
268 } 270 }
269 } 271 }
270 272
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 0a141c3..d3a283a 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -33,6 +33,8 @@ namespace OpenSim.Framework.Communications.Cache
33{ 33{
34 public class SQLAssetServer : AssetServerBase 34 public class SQLAssetServer : AssetServerBase
35 { 35 {
36 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
37
36 public SQLAssetServer(string pluginName) 38 public SQLAssetServer(string pluginName)
37 { 39 {
38 AddPlugin(pluginName); 40 AddPlugin(pluginName);
@@ -45,7 +47,7 @@ namespace OpenSim.Framework.Communications.Cache
45 47
46 public void AddPlugin(string FileName) 48 public void AddPlugin(string FileName)
47 { 49 {
48 MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName); 50 m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName);
49 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 51 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
50 52
51 foreach (Type pluginType in pluginAssembly.GetTypes()) 53 foreach (Type pluginType in pluginAssembly.GetTypes())
@@ -61,15 +63,14 @@ namespace OpenSim.Framework.Communications.Cache
61 m_assetProvider = plug; 63 m_assetProvider = plug;
62 m_assetProvider.Initialise(); 64 m_assetProvider.Initialise();
63 65
64 MainLog.Instance.Verbose("AssetStorage", 66 m_log.Info("[AssetStorage]: " +
65 "Added " + m_assetProvider.Name + " " + 67 "Added " + m_assetProvider.Name + " " +
66 m_assetProvider.Version); 68 m_assetProvider.Version);
67 } 69 }
68 } 70 }
69 } 71 }
70 } 72 }
71 73
72
73 public override void Close() 74 public override void Close()
74 { 75 {
75 base.Close(); 76 base.Close();
@@ -98,4 +99,4 @@ namespace OpenSim.Framework.Communications.Cache
98 m_assetProvider.CommitAssets(); 99 m_assetProvider.CommitAssets();
99 } 100 }
100 } 101 }
101} \ No newline at end of file 102}
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 14670fd..79c0c86 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -25,6 +25,8 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
29using System;
28using System.Collections.Generic; 30using System.Collections.Generic;
29using libsecondlife; 31using libsecondlife;
30using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
@@ -33,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache
33{ 35{
34 public class UserProfileCacheService 36 public class UserProfileCacheService
35 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
36 // Fields 40 // Fields
37 private readonly CommunicationsManager m_parent; 41 private readonly CommunicationsManager m_parent;
38 private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); 42 private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>();
@@ -69,7 +73,7 @@ namespace OpenSim.Framework.Communications.Cache
69 } 73 }
70 else 74 else
71 { 75 {
72 MainLog.Instance.Error("USERCACHE", "User profile for user {0} not found", userID); 76 m_log.Error(String.Format("[USERCACHE]: User profile for user {0} not found", userID));
73 } 77 }
74 } 78 }
75 } 79 }
@@ -229,28 +233,28 @@ namespace OpenSim.Framework.Communications.Cache
229 } 233 }
230 else 234 else
231 { 235 {
232 MainLog.Instance.Error( 236 m_log.Error(
233 "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); 237 String.Format("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name));
234 238
235 return; 239 return;
236 } 240 }
237 } 241 }
238 else 242 else
239 { 243 {
240 MainLog.Instance.Error( 244 m_log.Error(
241 "INVENTORYCACHE", 245 String.Format("[INVENTORYCACHE]: " +
242 "Could not find user profile for {0} for folder {1}", 246 "Could not find user profile for {0} for folder {1}",
243 remoteClient.Name, folderID); 247 remoteClient.Name, folderID));
244 248
245 return; 249 return;
246 } 250 }
247 251
248 // If we've reached this point then we couldn't find the folder, even though the client thinks 252 // If we've reached this point then we couldn't find the folder, even though the client thinks
249 // it exists 253 // it exists
250 MainLog.Instance.Error( 254 m_log.Error(
251 "INVENTORYCACHE", 255 String.Format("[INVENTORYCACHE]: " +
252 "Could not find folder {0} for user {1}", 256 "Could not find folder {0} for user {1}",
253 folderID, remoteClient.Name); 257 folderID, remoteClient.Name));
254 } 258 }
255 259
256 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) 260 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index f85b4ab..6473c26 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -54,6 +54,8 @@ namespace OpenSim.Region.Capabilities
54 54
55 public class Caps 55 public class Caps
56 { 56 {
57 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
58
57 private string m_httpListenerHostName; 59 private string m_httpListenerHostName;
58 private uint m_httpListenPort; 60 private uint m_httpListenPort;
59 61
@@ -96,7 +98,7 @@ namespace OpenSim.Region.Capabilities
96 /// </summary> 98 /// </summary>
97 public void RegisterHandlers() 99 public void RegisterHandlers()
98 { 100 {
99 MainLog.Instance.Verbose("CAPS", "Registering CAPS handlers"); 101 m_log.Info("[CAPS]: Registering CAPS handlers");
100 string capsBase = "/CAPS/" + m_capsObjectPath; 102 string capsBase = "/CAPS/" + m_capsObjectPath;
101 try 103 try
102 { 104 {
@@ -115,7 +117,7 @@ namespace OpenSim.Region.Capabilities
115 } 117 }
116 catch (Exception e) 118 catch (Exception e)
117 { 119 {
118 MainLog.Instance.Error("CAPS", e.ToString()); 120 m_log.Error("[CAPS]: " + e.ToString());
119 } 121 }
120 } 122 }
121 123
@@ -275,7 +277,7 @@ namespace OpenSim.Region.Capabilities
275 { 277 {
276 try 278 try
277 { 279 {
278// MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param); 280// m_log.Debug(String.Format("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param));
279 281
280 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); 282 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request));
281 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); 283 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
@@ -303,16 +305,16 @@ namespace OpenSim.Region.Capabilities
303 uploadResponse.uploader = uploaderURL; 305 uploadResponse.uploader = uploaderURL;
304 uploadResponse.state = "upload"; 306 uploadResponse.state = "upload";
305 307
306// MainLog.Instance.Verbose( 308// m_log.Info(
307// "CAPS", 309// String.Format("[CAPS]: " +
308// "ScriptTaskInventory response: {0}", 310// "ScriptTaskInventory response: {0}",
309// LLSDHelpers.SerialiseLLSDReply(uploadResponse)); 311// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
310 312
311 return LLSDHelpers.SerialiseLLSDReply(uploadResponse); 313 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
312 } 314 }
313 catch (Exception e) 315 catch (Exception e)
314 { 316 {
315 MainLog.Instance.Error("CAPS", e.ToString()); 317 m_log.Error("[CAPS]: " + e.ToString());
316 } 318 }
317 319
318 return null; 320 return null;
@@ -349,10 +351,10 @@ namespace OpenSim.Region.Capabilities
349 uploadResponse.uploader = uploaderURL; 351 uploadResponse.uploader = uploaderURL;
350 uploadResponse.state = "upload"; 352 uploadResponse.state = "upload";
351 353
352// MainLog.Instance.Verbose( 354// m_log.Info(
353// "CAPS", 355// String.Format("[CAPS]: " +
354// "NoteCardAgentInventory response: {0}", 356// "NoteCardAgentInventory response: {0}",
355// LLSDHelpers.SerialiseLLSDReply(uploadResponse)); 357// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
356 358
357 return LLSDHelpers.SerialiseLLSDReply(uploadResponse); 359 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
358 } 360 }
@@ -681,10 +683,10 @@ namespace OpenSim.Region.Capabilities
681 { 683 {
682 try 684 try
683 { 685 {
684// MainLog.Instance.Verbose( 686// m_log.Info(
685// "CAPS", 687// String.Format("[CAPS]: " +
686// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", 688// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
687// data, path, param); 689// data, path, param));
688 690
689 string res = String.Empty; 691 string res = String.Empty;
690 LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); 692 LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete();
@@ -707,13 +709,13 @@ namespace OpenSim.Region.Capabilities
707 SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); 709 SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data);
708 } 710 }
709 711
710// MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); 712// m_log.Info(String.Format("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res));
711 713
712 return res; 714 return res;
713 } 715 }
714 catch (Exception e) 716 catch (Exception e)
715 { 717 {
716 MainLog.Instance.Error("CAPS", e.ToString()); 718 m_log.Error("[CAPS]: " + e.ToString());
717 } 719 }
718 720
719 // XXX Maybe this should be some meaningful error packet 721 // XXX Maybe this should be some meaningful error packet
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index dd7c168..f6cfda7 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications
36{ 36{
37 public class CommunicationsManager 37 public class CommunicationsManager
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 protected IUserService m_userService; 41 protected IUserService m_userService;
40 42
41 public IUserService UserService 43 public IUserService UserService
@@ -114,11 +116,11 @@ namespace OpenSim.Framework.Communications
114 116
115 if (cmmdParams.Length < 2) 117 if (cmmdParams.Length < 2)
116 { 118 {
117 firstName = MainLog.Instance.CmdPrompt("First name", "Default"); 119 firstName = MainConsole.Instance.CmdPrompt("First name", "Default");
118 lastName = MainLog.Instance.CmdPrompt("Last name", "User"); 120 lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
119 password = MainLog.Instance.PasswdPrompt("Password"); 121 password = MainConsole.Instance.PasswdPrompt("Password");
120 regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000")); 122 regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", "1000"));
121 regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000")); 123 regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", "1000"));
122 } 124 }
123 else 125 else
124 { 126 {
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index a48988d..897aa9a 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications
36{ 36{
37 public abstract class InventoryServiceBase : IInventoryServices 37 public abstract class InventoryServiceBase : IInventoryServices
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); 41 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
40 //protected IAssetServer m_assetServer; 42 //protected IAssetServer m_assetServer;
41 43
@@ -52,7 +54,7 @@ namespace OpenSim.Framework.Communications
52 { 54 {
53 if (!String.IsNullOrEmpty(FileName)) 55 if (!String.IsNullOrEmpty(FileName))
54 { 56 {
55 MainLog.Instance.Verbose("AGENTINVENTORY", "Inventorystorage: Attempting to load " + FileName); 57 m_log.Info("[AGENTINVENTORY]: Inventorystorage: Attempting to load " + FileName);
56 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 58 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
57 59
58 foreach (Type pluginType in pluginAssembly.GetTypes()) 60 foreach (Type pluginType in pluginAssembly.GetTypes())
@@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications
67 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 69 (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
68 plug.Initialise(); 70 plug.Initialise();
69 m_plugins.Add(plug.getName(), plug); 71 m_plugins.Add(plug.getName(), plug);
70 MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); 72 m_log.Info("[AGENTINVENTORY]: Added IInventoryData Interface");
71 } 73 }
72 } 74 }
73 } 75 }
@@ -95,9 +97,8 @@ namespace OpenSim.Framework.Communications
95 rootFolder = plugin.Value.getUserRootFolder(userID); 97 rootFolder = plugin.Value.getUserRootFolder(userID);
96 if (rootFolder != null) 98 if (rootFolder != null)
97 { 99 {
98 MainLog.Instance.Verbose( 100 m_log.Info(
99 "INVENTORY", 101 "[INVENTORY]: Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
100 "Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
101 102
102 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); 103 inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
103 inventoryList.Insert(0, rootFolder); 104 inventoryList.Insert(0, rootFolder);
@@ -105,8 +106,8 @@ namespace OpenSim.Framework.Communications
105 } 106 }
106 } 107 }
107 108
108 MainLog.Instance.Warn( 109 m_log.Warn(
109 "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); 110 "[INVENTORY]: Could not find a root folder belonging to user with ID " + userID);
110 111
111 return inventoryList; 112 return inventoryList;
112 } 113 }
@@ -226,10 +227,10 @@ namespace OpenSim.Framework.Communications
226 227
227 if (null != existingRootFolder) 228 if (null != existingRootFolder)
228 { 229 {
229 MainLog.Instance.Error( 230 m_log.Error(
230 "AGENTINVENTORY", 231 String.Format("[AGENTINVENTORY]: " +
231 "Did not create a new inventory for user {0} since they already have " 232 "Did not create a new inventory for user {0} since they already have "
232 + "a root inventory folder with id {1}", user, existingRootFolder); 233 + "a root inventory folder with id {1}", user, existingRootFolder));
233 } 234 }
234 else 235 else
235 { 236 {
@@ -251,6 +252,7 @@ namespace OpenSim.Framework.Communications
251 public virtual void CreateNewInventorySet(LLUUID user) 252 public virtual void CreateNewInventorySet(LLUUID user)
252 { 253 {
253 InventoryFolderBase folder = new InventoryFolderBase(); 254 InventoryFolderBase folder = new InventoryFolderBase();
255
254 folder.parentID = LLUUID.Zero; 256 folder.parentID = LLUUID.Zero;
255 folder.agentID = user; 257 folder.agentID = user;
256 folder.folderID = LLUUID.Random(); 258 folder.folderID = LLUUID.Random();
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index 7f8658d..9036884 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.UserManagement
42 /// </summary> 42 /// </summary>
43 public class LoginResponse 43 public class LoginResponse
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 private Hashtable loginFlagsHash; 47 private Hashtable loginFlagsHash;
46 private Hashtable globalTexturesHash; 48 private Hashtable globalTexturesHash;
47 private Hashtable loginError; 49 private Hashtable loginError;
@@ -362,10 +364,8 @@ namespace OpenSim.Framework.UserManagement
362 } 364 }
363 catch (Exception e) 365 catch (Exception e)
364 { 366 {
365 MainLog.Instance.Warn( 367 m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message);
366 "CLIENT", 368
367 "LoginResponse: Error creating XML-RPC Response: " + e.Message
368 );
369 return (GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); 369 return (GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
370 } 370 }
371 } // ToXmlRpcResponse 371 } // ToXmlRpcResponse
@@ -461,10 +461,8 @@ namespace OpenSim.Framework.UserManagement
461 } 461 }
462 catch (Exception e) 462 catch (Exception e)
463 { 463 {
464 MainLog.Instance.Warn( 464 m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message);
465 "CLIENT", 465
466 "LoginResponse: Error creating XML-RPC Response: " + e.Message
467 );
468 return GenerateFailureResponseLLSD("Internal Error", "Error generating Login Response", "false"); 466 return GenerateFailureResponseLLSD("Internal Error", "Error generating Login Response", "false");
469 } 467 }
470 } 468 }
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 865349f..db86a97 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.UserManagement
44{ 44{
45 public class LoginService 45 public class LoginService
46 { 46 {
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
48
47 protected string m_welcomeMessage = "Welcome to OpenSim"; 49 protected string m_welcomeMessage = "Welcome to OpenSim";
48 protected UserManagerBase m_userManager = null; 50 protected UserManagerBase m_userManager = null;
49 protected Mutex m_loginMutex = new Mutex(false); 51 protected Mutex m_loginMutex = new Mutex(false);
@@ -83,7 +85,7 @@ namespace OpenSim.Framework.UserManagement
83 try 85 try
84 { 86 {
85 //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. 87 //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this.
86 //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now..."); 88 //CKF: m_log.Info("[LOGIN]: Attempting login now...");
87 XmlRpcResponse response = new XmlRpcResponse(); 89 XmlRpcResponse response = new XmlRpcResponse();
88 Hashtable requestData = (Hashtable) request.Params[0]; 90 Hashtable requestData = (Hashtable) request.Params[0];
89 91
@@ -102,16 +104,14 @@ namespace OpenSim.Framework.UserManagement
102 if( requestData.Contains("version")) 104 if( requestData.Contains("version"))
103 { 105 {
104 string clientversion = (string)requestData["version"]; 106 string clientversion = (string)requestData["version"];
105 MainLog.Instance.Verbose("LOGIN","Client Version " + clientversion + " for " + firstname + " " + lastname); 107 m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname);
106 } 108 }
107 109
108 110
109 userProfile = GetTheUser(firstname, lastname); 111 userProfile = GetTheUser(firstname, lastname);
110 if (userProfile == null) 112 if (userProfile == null)
111 { 113 {
112 MainLog.Instance.Verbose( 114 m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname);
113 "LOGIN",
114 "Could not find a profile for " + firstname + " " + lastname);
115 115
116 return logResponse.CreateLoginFailedResponse(); 116 return logResponse.CreateLoginFailedResponse();
117 } 117 }
@@ -213,7 +213,7 @@ namespace OpenSim.Framework.UserManagement
213 } 213 }
214 catch (Exception e) 214 catch (Exception e)
215 { 215 {
216 MainLog.Instance.Verbose("LOGIN", e.ToString()); 216 m_log.Info("[LOGIN]: " + e.ToString());
217 return logResponse.CreateDeadRegionResponse(); 217 return logResponse.CreateDeadRegionResponse();
218 //return logResponse.ToXmlRpcResponse(); 218 //return logResponse.ToXmlRpcResponse();
219 } 219 }
@@ -225,10 +225,9 @@ namespace OpenSim.Framework.UserManagement
225 225
226 return logResponse.ToXmlRpcResponse(); 226 return logResponse.ToXmlRpcResponse();
227 } 227 }
228 228 catch (Exception e)
229 catch (Exception E)
230 { 229 {
231 MainLog.Instance.Verbose("LOGIN", E.ToString()); 230 m_log.Info("[LOGIN]: " + e.ToString());
232 } 231 }
233 //} 232 //}
234 } 233 }
@@ -265,9 +264,7 @@ namespace OpenSim.Framework.UserManagement
265 userProfile = GetTheUser(firstname, lastname); 264 userProfile = GetTheUser(firstname, lastname);
266 if (userProfile == null) 265 if (userProfile == null)
267 { 266 {
268 MainLog.Instance.Verbose( 267 m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname);
269 "LOGIN",
270 "Could not find a profile for " + firstname + " " + lastname);
271 268
272 return logResponse.CreateLoginFailedResponseLLSD(); 269 return logResponse.CreateLoginFailedResponseLLSD();
273 } 270 }
@@ -345,7 +342,7 @@ namespace OpenSim.Framework.UserManagement
345 } 342 }
346 catch (Exception ex) 343 catch (Exception ex)
347 { 344 {
348 MainLog.Instance.Verbose("LOGIN", ex.ToString()); 345 m_log.Info("[LOGIN]: " + ex.ToString());
349 return logResponse.CreateDeadRegionResponseLLSD(); 346 return logResponse.CreateDeadRegionResponseLLSD();
350 } 347 }
351 348
@@ -359,7 +356,7 @@ namespace OpenSim.Framework.UserManagement
359 } 356 }
360 catch (Exception ex) 357 catch (Exception ex)
361 { 358 {
362 MainLog.Instance.Verbose("LOGIN", ex.ToString()); 359 m_log.Info("[LOGIN]: " + ex.ToString());
363 return logResponse.CreateFailedResponseLLSD(); 360 return logResponse.CreateFailedResponseLLSD();
364 } 361 }
365 } 362 }
@@ -458,7 +455,7 @@ namespace OpenSim.Framework.UserManagement
458 string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" + 455 string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" +
459 lastname + 456 lastname +
460 "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString()); 457 "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString());
461 //MainLog.Instance.Verbose("WEB", "R:" + redirectURL); 458 //m_log.Info("[WEB]: R:" + redirectURL);
462 returnactions["int_response_code"] = statuscode; 459 returnactions["int_response_code"] = statuscode;
463 returnactions["str_redirect_location"] = redirectURL; 460 returnactions["str_redirect_location"] = redirectURL;
464 returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>"; 461 returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>";
@@ -604,27 +601,22 @@ namespace OpenSim.Framework.UserManagement
604 public virtual bool AuthenticateUser(UserProfileData profile, string password) 601 public virtual bool AuthenticateUser(UserProfileData profile, string password)
605 { 602 {
606 bool passwordSuccess = false; 603 bool passwordSuccess = false;
607 MainLog.Instance.Verbose( 604 m_log.Info(
608 "LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); 605 String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
609 606
610 // Web Login method seems to also occasionally send the hashed password itself 607 // Web Login method seems to also occasionally send the hashed password itself
611 608
612
613 // we do this to get our hash in a form that the server password code can consume 609 // we do this to get our hash in a form that the server password code can consume
614 // when the web-login-form submits the password in the clear (supposed to be over SSL!) 610 // when the web-login-form submits the password in the clear (supposed to be over SSL!)
615 if (!password.StartsWith("$1$")) 611 if (!password.StartsWith("$1$"))
616 password = "$1$" + Util.Md5Hash(password); 612 password = "$1$" + Util.Md5Hash(password);
617 613
618
619
620 password = password.Remove(0, 3); //remove $1$ 614 password = password.Remove(0, 3); //remove $1$
621 615
622
623
624 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 616 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
625 // Testing... 617 // Testing...
626 //MainLog.Instance.Verbose("LOGIN", "SubHash:" + s + " userprofile:" + profile.passwordHash); 618 //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash);
627 //MainLog.Instance.Verbose("LOGIN", "userprofile:" + profile.passwordHash + " SubCT:" + password); 619 //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
628 620
629 passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) 621 passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
630 || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase)); 622 || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase));
@@ -635,8 +627,8 @@ namespace OpenSim.Framework.UserManagement
635 public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) 627 public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey)
636 { 628 {
637 bool passwordSuccess = false; 629 bool passwordSuccess = false;
638 MainLog.Instance.Verbose( 630 m_log.Info(
639 "LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); 631 String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID));
640 632
641 // Match web login key unless it's the default weblogin key LLUUID.Zero 633 // Match web login key unless it's the default weblogin key LLUUID.Zero
642 passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); 634 passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero);
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index 76bad64..f968c9a 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -56,6 +56,8 @@ namespace OpenSim.Framework.Communications
56 /// </remarks> 56 /// </remarks>
57 public class RestClient 57 public class RestClient
58 { 58 {
59 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
60
59 private string realuri; 61 private string realuri;
60 62
61 #region member variables 63 #region member variables
@@ -238,7 +240,7 @@ namespace OpenSim.Framework.Communications
238 } 240 }
239 } 241 }
240 realuri = sb.ToString(); 242 realuri = sb.ToString();
241 MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); 243 m_log.Info(String.Format("[REST]: RestURL: {0}", realuri));
242 return new Uri(sb.ToString()); 244 return new Uri(sb.ToString());
243 } 245 }
244 246
@@ -374,16 +376,16 @@ namespace OpenSim.Framework.Communications
374 _asyncException = null; 376 _asyncException = null;
375 _request.ContentLength = src.Length; 377 _request.ContentLength = src.Length;
376 378
377 MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); 379 m_log.Info(String.Format("[REST]: Request Length {0}", _request.ContentLength));
378 MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); 380 m_log.Info(String.Format("[REST]: Sending Web Request {0}", buildUri()));
379 src.Seek(0, SeekOrigin.Begin); 381 src.Seek(0, SeekOrigin.Begin);
380 MainLog.Instance.Verbose("REST", "Seek is ok"); 382 m_log.Info("[REST]: Seek is ok");
381 Stream dst = _request.GetRequestStream(); 383 Stream dst = _request.GetRequestStream();
382 MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); 384 m_log.Info("[REST]: GetRequestStream is ok");
383 385
384 byte[] buf = new byte[1024]; 386 byte[] buf = new byte[1024];
385 int length = src.Read(buf, 0, 1024); 387 int length = src.Read(buf, 0, 1024);
386 MainLog.Instance.Verbose("REST", "First Read is ok"); 388 m_log.Info("[REST]: First Read is ok");
387 while (length > 0) 389 while (length > 0)
388 { 390 {
389 dst.Write(buf, 0, length); 391 dst.Write(buf, 0, length);
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 3b1d837..edab6ae 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -43,6 +43,8 @@ namespace OpenSim.Framework.UserManagement
43 /// </summary> 43 /// </summary>
44 public abstract class UserManagerBase : IUserService 44 public abstract class UserManagerBase : IUserService
45 { 45 {
46 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
47
46 public UserConfig _config; 48 public UserConfig _config;
47 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 49 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
48 50
@@ -54,10 +56,10 @@ namespace OpenSim.Framework.UserManagement
54 { 56 {
55 if (!String.IsNullOrEmpty(FileName)) 57 if (!String.IsNullOrEmpty(FileName))
56 { 58 {
57 MainLog.Instance.Verbose("USERSTORAGE", "Attempting to load " + FileName); 59 m_log.Info("[USERSTORAGE]: Attempting to load " + FileName);
58 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 60 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
59 61
60 MainLog.Instance.Verbose("USERSTORAGE", "Found " + pluginAssembly.GetTypes().Length + " interfaces."); 62 m_log.Info("[USERSTORAGE]: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
61 foreach (Type pluginType in pluginAssembly.GetTypes()) 63 foreach (Type pluginType in pluginAssembly.GetTypes())
62 { 64 {
63 if (!pluginType.IsAbstract) 65 if (!pluginType.IsAbstract)
@@ -79,7 +81,7 @@ namespace OpenSim.Framework.UserManagement
79 { 81 {
80 plug.Initialise(); 82 plug.Initialise();
81 _plugins.Add(plug.getName(), plug); 83 _plugins.Add(plug.getName(), plug);
82 MainLog.Instance.Verbose("USERSTORAGE", "Added IUserData Interface"); 84 m_log.Info("[USERSTORAGE]: Added IUserData Interface");
83 } 85 }
84 86
85 #region Get UserProfile 87 #region Get UserProfile
@@ -116,8 +118,7 @@ namespace OpenSim.Framework.UserManagement
116 } 118 }
117 catch (Exception) 119 catch (Exception)
118 { 120 {
119 MainLog.Instance.Verbose("USERSTORAGE", 121 m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
120 "Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
121 return new List<AvatarPickerAvatar>(); 122 return new List<AvatarPickerAvatar>();
122 } 123 }
123 } 124 }
@@ -163,8 +164,7 @@ namespace OpenSim.Framework.UserManagement
163 } 164 }
164 catch (Exception e) 165 catch (Exception e)
165 { 166 {
166 MainLog.Instance.Verbose("USERSTORAGE", 167 m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
167 "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
168 } 168 }
169 } 169 }
170 170
@@ -190,8 +190,7 @@ namespace OpenSim.Framework.UserManagement
190 } 190 }
191 catch (Exception e) 191 catch (Exception e)
192 { 192 {
193 MainLog.Instance.Verbose("USERSTORAGE", 193 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
194 "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
195 } 194 }
196 } 195 }
197 196
@@ -214,8 +213,7 @@ namespace OpenSim.Framework.UserManagement
214 } 213 }
215 catch (Exception e) 214 catch (Exception e)
216 { 215 {
217 MainLog.Instance.Verbose("USERSTORAGE", 216 m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
218 "Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
219 } 217 }
220 } 218 }
221 219
@@ -234,8 +232,7 @@ namespace OpenSim.Framework.UserManagement
234 } 232 }
235 catch (Exception e) 233 catch (Exception e)
236 { 234 {
237 MainLog.Instance.Verbose("USERSTORAGE", 235 m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")");
238 "Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")");
239 } 236 }
240 } 237 }
241 } 238 }
@@ -250,8 +247,7 @@ namespace OpenSim.Framework.UserManagement
250 } 247 }
251 catch (Exception e) 248 catch (Exception e)
252 { 249 {
253 MainLog.Instance.Verbose("USERSTORAGE", 250 m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
254 "Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
255 } 251 }
256 } 252 }
257 253
@@ -268,8 +264,7 @@ namespace OpenSim.Framework.UserManagement
268 } 264 }
269 catch (Exception e) 265 catch (Exception e)
270 { 266 {
271 MainLog.Instance.Verbose("USERSTORAGE", 267 m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
272 "Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
273 } 268 }
274 } 269 }
275 } 270 }
@@ -284,8 +279,7 @@ namespace OpenSim.Framework.UserManagement
284 } 279 }
285 catch (Exception e) 280 catch (Exception e)
286 { 281 {
287 MainLog.Instance.Verbose("USERSTORAGE", 282 m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
288 "Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
289 } 283 }
290 } 284 }
291 } 285 }
@@ -304,8 +298,7 @@ namespace OpenSim.Framework.UserManagement
304 } 298 }
305 catch (Exception e) 299 catch (Exception e)
306 { 300 {
307 MainLog.Instance.Verbose("USERSTORAGE", 301 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
308 "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
309 } 302 }
310 } 303 }
311 304
@@ -337,8 +330,7 @@ namespace OpenSim.Framework.UserManagement
337 } 330 }
338 catch (Exception e) 331 catch (Exception e)
339 { 332 {
340 MainLog.Instance.Verbose("USERSTORAGE", 333 m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
341 "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
342 } 334 }
343 } 335 }
344 336
@@ -454,14 +446,14 @@ namespace OpenSim.Framework.UserManagement
454 } 446 }
455 else 447 else
456 { 448 {
457 MainLog.Instance.Verbose("LOGOUT", "didn't save logout position, currentAgent is null *do Fix "); 449 m_log.Info("[LOGOUT]: didn't save logout position, currentAgent is null *do Fix ");
458 } 450 }
459 MainLog.Instance.Verbose("LOGOUT", userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" ); 451 m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" );
460 MainLog.Instance.Verbose("LOGOUT", "userid: " + userid.ToString() + " regionid: " + regionid.ToString() ); 452 m_log.Info("[LOGOUT]: userid: " + userid.ToString() + " regionid: " + regionid.ToString() );
461 } 453 }
462 else 454 else
463 { 455 {
464 MainLog.Instance.Warn("LOGOUT", "Unknown User logged out"); 456 m_log.Warn("[LOGOUT]: Unknown User logged out");
465 } 457 }
466 } 458 }
467 459
@@ -539,8 +531,7 @@ namespace OpenSim.Framework.UserManagement
539 } 531 }
540 catch (Exception e) 532 catch (Exception e)
541 { 533 {
542 MainLog.Instance.Verbose("USERSTORAGE", 534 m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
543 "Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
544 } 535 }
545 } 536 }
546 537
diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
index e27c88b..a657c3a 100644
--- a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
+++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.Configuration.HTTP
35{ 35{
36 public class HTTPConfiguration : IGenericConfig 36 public class HTTPConfiguration : IGenericConfig
37 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
38 private RemoteConfigSettings remoteConfigSettings; 40 private RemoteConfigSettings remoteConfigSettings;
39 41
40 private XmlConfiguration xmlConfig; 42 private XmlConfiguration xmlConfig;
@@ -81,7 +83,7 @@ namespace OpenSim.Framework.Configuration.HTTP
81 } 83 }
82 catch (WebException) 84 catch (WebException)
83 { 85 {
84 MainLog.Instance.Warn("Unable to connect to remote configuration file (" + 86 m_log.Warn("Unable to connect to remote configuration file (" +
85 remoteConfigSettings.baseConfigURL + configFileName + 87 remoteConfigSettings.baseConfigURL + configFileName +
86 "). Creating local file instead."); 88 "). Creating local file instead.");
87 xmlConfig.SetFileName(configFileName); 89 xmlConfig.SetFileName(configFileName);
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 7590495..921fb66 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework
39{ 39{
40 public class ConfigurationMember 40 public class ConfigurationMember
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); 44 public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
43 45
44 public delegate void ConfigurationOptionsLoad(); 46 public delegate void ConfigurationOptionsLoad();
@@ -110,7 +112,7 @@ namespace OpenSim.Framework
110 } 112 }
111 else 113 else
112 { 114 {
113 MainLog.Instance.Notice( 115 m_log.Info(
114 "Required fields for adding a configuration option is invalid. Will not add this option (" + 116 "Required fields for adding a configuration option is invalid. Will not add this option (" +
115 option.configurationKey + ")"); 117 option.configurationKey + ")");
116 } 118 }
@@ -147,46 +149,44 @@ namespace OpenSim.Framework
147 checkAndAddConfigOption(configOption); 149 checkAndAddConfigOption(configOption);
148 } 150 }
149 151
150
151 // TEMP - REMOVE 152 // TEMP - REMOVE
152 private int cE = 0; 153 private int cE = 0;
153 public void performConfigurationRetrieve() 154 public void performConfigurationRetrieve()
154 { 155 {
155 if (cE > 1) 156 if (cE > 1)
156 MainLog.Instance.Error("READING CONFIGURATION COUT: " + cE.ToString()); 157 m_log.Error("READING CONFIGURATION COUT: " + cE.ToString());
157 158
158 159
159 configurationPlugin = LoadConfigDll(configurationPluginFilename); 160 configurationPlugin = LoadConfigDll(configurationPluginFilename);
160 configurationOptions.Clear(); 161 configurationOptions.Clear();
161 if (loadFunction == null) 162 if (loadFunction == null)
162 { 163 {
163 MainLog.Instance.Error("Load Function for '" + configurationDescription + 164 m_log.Error("Load Function for '" + configurationDescription +
164 "' is null. Refusing to run configuration."); 165 "' is null. Refusing to run configuration.");
165 return; 166 return;
166 } 167 }
167 168
168 if (resultFunction == null) 169 if (resultFunction == null)
169 { 170 {
170 MainLog.Instance.Error("Result Function for '" + configurationDescription + 171 m_log.Error("Result Function for '" + configurationDescription +
171 "' is null. Refusing to run configuration."); 172 "' is null. Refusing to run configuration.");
172 return; 173 return;
173 } 174 }
174 175
175 MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function..."); 176 m_log.Info("[CONFIG]: Calling Configuration Load Function...");
176 loadFunction(); 177 loadFunction();
177 178
178 if (configurationOptions.Count <= 0) 179 if (configurationOptions.Count <= 0)
179 { 180 {
180 MainLog.Instance.Error("CONFIG", 181 m_log.Error("[CONFIG]: No configuration options were specified for '" + configurationOptions +
181 "No configuration options were specified for '" + configurationOptions + 182 "'. Refusing to continue configuration.");
182 "'. Refusing to continue configuration.");
183 return; 183 return;
184 } 184 }
185 185
186 bool useFile = true; 186 bool useFile = true;
187 if (configurationPlugin == null) 187 if (configurationPlugin == null)
188 { 188 {
189 MainLog.Instance.Error("CONFIG", "Configuration Plugin NOT LOADED!"); 189 m_log.Error("[CONFIG]: Configuration Plugin NOT LOADED!");
190 return; 190 return;
191 } 191 }
192 192
@@ -200,7 +200,7 @@ namespace OpenSim.Framework
200 } 200 }
201 catch (XmlException e) 201 catch (XmlException e)
202 { 202 {
203 MainLog.Instance.Error("Error loading " + configurationFilename + ": " + e.ToString()); 203 m_log.Error("Error loading " + configurationFilename + ": " + e.ToString());
204 useFile = false; 204 useFile = false;
205 } 205 }
206 } 206 }
@@ -208,11 +208,11 @@ namespace OpenSim.Framework
208 { 208 {
209 if (configurationFromXMLNode != null) 209 if (configurationFromXMLNode != null)
210 { 210 {
211 MainLog.Instance.Notice("Loading from XML Node, will not save to the file"); 211 m_log.Info("Loading from XML Node, will not save to the file");
212 configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml); 212 configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml);
213 } 213 }
214 214
215 MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); 215 m_log.Info("XML Configuration Filename is not valid; will not save to the file.");
216 useFile = false; 216 useFile = false;
217 } 217 }
218 218
@@ -253,15 +253,15 @@ namespace OpenSim.Framework
253 if (configurationDescription.Trim() != String.Empty) 253 if (configurationDescription.Trim() != String.Empty)
254 { 254 {
255 console_result = 255 console_result =
256 MainLog.Instance.CmdPrompt( 256 MainConsole.Instance.CmdPrompt(
257 configurationDescription + ": " + configOption.configurationQuestion, 257 configurationDescription + ": " + configOption.configurationQuestion,
258 configOption.configurationDefault); 258 configOption.configurationDefault);
259 } 259 }
260 else 260 else
261 { 261 {
262 console_result = 262 console_result =
263 MainLog.Instance.CmdPrompt(configOption.configurationQuestion, 263 MainConsole.Instance.CmdPrompt(configOption.configurationQuestion,
264 configOption.configurationDefault); 264 configOption.configurationDefault);
265 } 265 }
266 } 266 }
267 else 267 else
@@ -431,7 +431,7 @@ namespace OpenSim.Framework
431 431
432 if (!resultFunction(configOption.configurationKey, return_result)) 432 if (!resultFunction(configOption.configurationKey, return_result))
433 { 433 {
434 MainLog.Instance.Notice( 434 m_log.Info(
435 "The handler for the last configuration option denied that input, please try again."); 435 "The handler for the last configuration option denied that input, please try again.");
436 convertSuccess = false; 436 convertSuccess = false;
437 ignoreNextFromConfig = true; 437 ignoreNextFromConfig = true;
@@ -441,20 +441,18 @@ namespace OpenSim.Framework
441 { 441 {
442 if (configOption.configurationUseDefaultNoPrompt) 442 if (configOption.configurationUseDefaultNoPrompt)
443 { 443 {
444 MainLog.Instance.Error("CONFIG", 444 m_log.Error(string.Format(
445 string.Format( 445 "[CONFIG]: [{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n",
446 "[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", 446 configOption.configurationKey, console_result, errorMessage,
447 configOption.configurationKey, console_result, errorMessage, 447 configurationFilename));
448 configurationFilename));
449 convertSuccess = true; 448 convertSuccess = true;
450 } 449 }
451 else 450 else
452 { 451 {
453 MainLog.Instance.Warn("CONFIG", 452 m_log.Warn(string.Format(
454 string.Format( 453 "[CONFIG]: [{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n",
455 "[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", 454 configOption.configurationKey, console_result, errorMessage,
456 configOption.configurationKey, console_result, errorMessage, 455 configurationFilename));
457 configurationFilename));
458 ignoreNextFromConfig = true; 456 ignoreNextFromConfig = true;
459 } 457 }
460 } 458 }
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index a2c4b3a..3f68e50 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -33,61 +33,28 @@ using System.Net;
33 33
34namespace OpenSim.Framework.Console 34namespace OpenSim.Framework.Console
35{ 35{
36 public enum LogPriority : int 36 public class ConsoleBase
37 { 37 {
38 CRITICAL, 38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39 HIGH,
40 MEDIUM,
41 NORMAL,
42 LOW,
43 VERBOSE,
44 EXTRAVERBOSE
45 }
46 39
47 public class LogBase
48 {
49 private object m_syncRoot = new object(); 40 private object m_syncRoot = new object();
50 41
51 private StreamWriter Log; 42 public conscmd_callback m_cmdParser;
52 public conscmd_callback cmdparser; 43 public string m_componentName;
53 public string componentname;
54 private bool m_verbose;
55 44
56 public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool verbose) 45 public ConsoleBase(string componentname, conscmd_callback cmdparser)
57 { 46 {
58 this.componentname = componentname; 47 m_componentName = componentname;
59 this.cmdparser = cmdparser; 48 m_cmdParser = cmdparser;
60 m_verbose = verbose;
61 System.Console.WriteLine("Creating new local console");
62
63 if (String.IsNullOrEmpty(LogFile))
64 {
65 LogFile = componentname + ".log";
66 }
67 49
68 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); 50 System.Console.WriteLine("Creating new local console");
69 51
70 try 52 m_log.Info("[" + m_componentName + "]: Started at " + DateTime.Now.ToString());
71 {
72 Log = File.AppendText(LogFile);
73 }
74 catch (Exception ex)
75 {
76 System.Console.WriteLine("Unable to open log file. Do you already have another copy of OpenSim running? Permission problem?");
77 System.Console.WriteLine(ex.Message);
78 System.Console.WriteLine("");
79 System.Console.WriteLine("Application is terminating.");
80 System.Console.WriteLine("");
81 System.Threading.Thread.CurrentThread.Abort();
82 }
83 Log.WriteLine("========================================================================");
84 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
85 } 53 }
86 54
87 public void Close() 55 public void Close()
88 { 56 {
89 Log.WriteLine("Shutdown at " + DateTime.Now.ToString()); 57 m_log.Info("[" + m_componentName + "]: Shutdown at " + DateTime.Now.ToString());
90 Log.Close();
91 } 58 }
92 59
93 /// <summary> 60 /// <summary>
@@ -99,23 +66,22 @@ namespace OpenSim.Framework.Console
99 /// <returns>an ansii color</returns> 66 /// <returns>an ansii color</returns>
100 private ConsoleColor DeriveColor(string input) 67 private ConsoleColor DeriveColor(string input)
101 { 68 {
102 int colIdx = (input.ToUpper().GetHashCode()%6) + 9; 69 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
103 return (ConsoleColor) colIdx; 70 return (ConsoleColor) colIdx;
104 } 71 }
105 72
106 /// <summary> 73 /// <summary>
107 /// Sends a warning to the current log output 74 /// Sends a warning to the current console output
108 /// </summary> 75 /// </summary>
109 /// <param name="format">The message to send</param> 76 /// <param name="format">The message to send</param>
110 /// <param name="args">WriteLine-style message arguments</param> 77 /// <param name="args">WriteLine-style message arguments</param>
111 public void Warn(string format, params object[] args) 78 public void Warn(string format, params object[] args)
112 { 79 {
113 WriteNewLine(ConsoleColor.Yellow, format, args); 80 WriteNewLine(ConsoleColor.Yellow, format, args);
114 return;
115 } 81 }
116 82
117 /// <summary> 83 /// <summary>
118 /// Sends a warning to the current log output 84 /// Sends a warning to the current console output
119 /// </summary> 85 /// </summary>
120 /// <param name="sender">The module that sent this message</param> 86 /// <param name="sender">The module that sent this message</param>
121 /// <param name="format">The message to send</param> 87 /// <param name="format">The message to send</param>
@@ -124,22 +90,20 @@ namespace OpenSim.Framework.Console
124 { 90 {
125 WritePrefixLine(DeriveColor(sender), sender); 91 WritePrefixLine(DeriveColor(sender), sender);
126 WriteNewLine(ConsoleColor.Yellow, format, args); 92 WriteNewLine(ConsoleColor.Yellow, format, args);
127 return;
128 } 93 }
129 94
130 /// <summary> 95 /// <summary>
131 /// Sends a notice to the current log output 96 /// Sends a notice to the current console output
132 /// </summary> 97 /// </summary>
133 /// <param name="format">The message to send</param> 98 /// <param name="format">The message to send</param>
134 /// <param name="args">WriteLine-style message arguments</param> 99 /// <param name="args">WriteLine-style message arguments</param>
135 public void Notice(string format, params object[] args) 100 public void Notice(string format, params object[] args)
136 { 101 {
137 WriteNewLine(ConsoleColor.White, format, args); 102 WriteNewLine(ConsoleColor.White, format, args);
138 return;
139 } 103 }
140 104
141 /// <summary> 105 /// <summary>
142 /// Sends a notice to the current log output 106 /// Sends a notice to the current console output
143 /// </summary> 107 /// </summary>
144 /// <param name="sender">The module that sent this message</param> 108 /// <param name="sender">The module that sent this message</param>
145 /// <param name="format">The message to send</param> 109 /// <param name="format">The message to send</param>
@@ -148,22 +112,20 @@ namespace OpenSim.Framework.Console
148 { 112 {
149 WritePrefixLine(DeriveColor(sender), sender); 113 WritePrefixLine(DeriveColor(sender), sender);
150 WriteNewLine(ConsoleColor.White, format, args); 114 WriteNewLine(ConsoleColor.White, format, args);
151 return;
152 } 115 }
153 116
154 /// <summary> 117 /// <summary>
155 /// Sends an error to the current log output 118 /// Sends an error to the current console output
156 /// </summary> 119 /// </summary>
157 /// <param name="format">The message to send</param> 120 /// <param name="format">The message to send</param>
158 /// <param name="args">WriteLine-style message arguments</param> 121 /// <param name="args">WriteLine-style message arguments</param>
159 public void Error(string format, params object[] args) 122 public void Error(string format, params object[] args)
160 { 123 {
161 WriteNewLine(ConsoleColor.Red, format, args); 124 WriteNewLine(ConsoleColor.Red, format, args);
162 return;
163 } 125 }
164 126
165 /// <summary> 127 /// <summary>
166 /// Sends an error to the current log output 128 /// Sends an error to the current console output
167 /// </summary> 129 /// </summary>
168 /// <param name="sender">The module that sent this message</param> 130 /// <param name="sender">The module that sent this message</param>
169 /// <param name="format">The message to send</param> 131 /// <param name="format">The message to send</param>
@@ -172,38 +134,20 @@ namespace OpenSim.Framework.Console
172 { 134 {
173 WritePrefixLine(DeriveColor(sender), sender); 135 WritePrefixLine(DeriveColor(sender), sender);
174 Error(format, args); 136 Error(format, args);
175 return;
176 } 137 }
177 138
178 /// <summary> 139 /// <summary>
179 /// Sends an informational message to the current log output 140 /// Sends a status message to the current console output
180 /// </summary>
181 /// <param name="sender">The module that sent this message</param>
182 /// <param name="format">The message to send</param>
183 /// <param name="args">WriteLine-style message arguments</param>
184 public void Verbose(string sender, string format, params object[] args)
185 {
186 if (m_verbose)
187 {
188 WritePrefixLine(DeriveColor(sender), sender);
189 WriteNewLine(ConsoleColor.Gray, format, args);
190 return;
191 }
192 }
193
194 /// <summary>
195 /// Sends a status message to the current log output
196 /// </summary> 141 /// </summary>
197 /// <param name="format">The message to send</param> 142 /// <param name="format">The message to send</param>
198 /// <param name="args">WriteLine-style message arguments</param> 143 /// <param name="args">WriteLine-style message arguments</param>
199 public void Status(string format, params object[] args) 144 public void Status(string format, params object[] args)
200 { 145 {
201 WriteNewLine(ConsoleColor.Blue, format, args); 146 WriteNewLine(ConsoleColor.Blue, format, args);
202 return;
203 } 147 }
204 148
205 /// <summary> 149 /// <summary>
206 /// Sends a status message to the current log output 150 /// Sends a status message to the current console output
207 /// </summary> 151 /// </summary>
208 /// <param name="sender">The module that sent this message</param> 152 /// <param name="sender">The module that sent this message</param>
209 /// <param name="format">The message to send</param> 153 /// <param name="format">The message to send</param>
@@ -212,14 +156,12 @@ namespace OpenSim.Framework.Console
212 { 156 {
213 WritePrefixLine(DeriveColor(sender), sender); 157 WritePrefixLine(DeriveColor(sender), sender);
214 WriteNewLine(ConsoleColor.Blue, format, args); 158 WriteNewLine(ConsoleColor.Blue, format, args);
215 return;
216 } 159 }
217 160
218 [Conditional("DEBUG")] 161 [Conditional("DEBUG")]
219 public void Debug(string format, params object[] args) 162 public void Debug(string format, params object[] args)
220 { 163 {
221 WriteNewLine(ConsoleColor.Gray, format, args); 164 WriteNewLine(ConsoleColor.Gray, format, args);
222 return;
223 } 165 }
224 166
225 [Conditional("DEBUG")] 167 [Conditional("DEBUG")]
@@ -227,7 +169,6 @@ namespace OpenSim.Framework.Console
227 { 169 {
228 WritePrefixLine(DeriveColor(sender), sender); 170 WritePrefixLine(DeriveColor(sender), sender);
229 WriteNewLine(ConsoleColor.Gray, format, args); 171 WriteNewLine(ConsoleColor.Gray, format, args);
230 return;
231 } 172 }
232 173
233 private void WriteNewLine(ConsoleColor color, string format, params object[] args) 174 private void WriteNewLine(ConsoleColor color, string format, params object[] args)
@@ -236,19 +177,16 @@ namespace OpenSim.Framework.Console
236 { 177 {
237 lock (m_syncRoot) 178 lock (m_syncRoot)
238 { 179 {
239 string now = DateTime.Now.ToString("[MM-dd HH:mm:ss] ");
240 Log.Write(now);
241 try 180 try
242 { 181 {
243 Log.WriteLine(format, args); 182 System.Console.WriteLine(format, args);
244 Log.Flush();
245 } 183 }
246 184
247 catch (FormatException) 185 catch (FormatException)
248 { 186 {
249 System.Console.WriteLine(args); 187 System.Console.WriteLine(args);
250 } 188 }
251 System.Console.Write(now); 189
252 try 190 try
253 { 191 {
254 if (color != ConsoleColor.White) 192 if (color != ConsoleColor.White)
@@ -267,13 +205,10 @@ namespace OpenSim.Framework.Console
267 // Some older systems dont support coloured text. 205 // Some older systems dont support coloured text.
268 System.Console.WriteLine(args); 206 System.Console.WriteLine(args);
269 } 207 }
270
271 return;
272 } 208 }
273 } 209 }
274 catch (ObjectDisposedException) 210 catch (ObjectDisposedException)
275 { 211 {
276 return;
277 } 212 }
278 } 213 }
279 214
@@ -285,10 +220,7 @@ namespace OpenSim.Framework.Console
285 { 220 {
286 sender = sender.ToUpper(); 221 sender = sender.ToUpper();
287 222
288 Log.WriteLine("[" + sender + "] "); 223 System.Console.WriteLine("[" + sender + "] ");
289
290
291 Log.Flush();
292 224
293 System.Console.Write("["); 225 System.Console.Write("[");
294 226
@@ -305,37 +237,29 @@ namespace OpenSim.Framework.Console
305 } 237 }
306 238
307 System.Console.Write("] \t"); 239 System.Console.Write("] \t");
308
309 return;
310 } 240 }
311 } 241 }
312 catch (ObjectDisposedException) 242 catch (ObjectDisposedException)
313 { 243 {
314 return;
315 } 244 }
316 } 245 }
317 246
318
319 public string ReadLine() 247 public string ReadLine()
320 { 248 {
321 try 249 try
322 { 250 {
323 string TempStr = System.Console.ReadLine(); 251 return System.Console.ReadLine();
324 Log.WriteLine(TempStr);
325 return TempStr;
326 } 252 }
327 catch (Exception e) 253 catch (Exception e)
328 { 254 {
329 MainLog.Instance.Error("Console", "System.Console.ReadLine exception " + e.ToString()); 255 m_log.Error("[Console]: System.Console.ReadLine exception " + e.ToString());
330 return String.Empty; 256 return String.Empty;
331 } 257 }
332 } 258 }
333 259
334 public int Read() 260 public int Read()
335 { 261 {
336 int TempInt = System.Console.Read(); 262 return System.Console.Read();
337 Log.Write((char) TempInt);
338 return TempInt;
339 } 263 }
340 264
341 public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue) 265 public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue)
@@ -345,14 +269,14 @@ namespace OpenSim.Framework.Console
345 269
346 while (true) 270 while (true)
347 { 271 {
348 addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 272 addressStr = CmdPrompt(prompt, defaultvalue);
349 if (IPAddress.TryParse(addressStr, out address)) 273 if (IPAddress.TryParse(addressStr, out address))
350 { 274 {
351 break; 275 break;
352 } 276 }
353 else 277 else
354 { 278 {
355 MainLog.Instance.Error("Illegal address. Please re-enter."); 279 m_log.Error("Illegal address. Please re-enter.");
356 } 280 }
357 } 281 }
358 282
@@ -366,7 +290,7 @@ namespace OpenSim.Framework.Console
366 290
367 while (true) 291 while (true)
368 { 292 {
369 portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 293 portStr = CmdPrompt(prompt, defaultvalue);
370 if (uint.TryParse(portStr, out port)) 294 if (uint.TryParse(portStr, out port))
371 { 295 {
372 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) 296 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort)
@@ -375,7 +299,7 @@ namespace OpenSim.Framework.Console
375 } 299 }
376 } 300 }
377 301
378 MainLog.Instance.Error("Illegal address. Please re-enter."); 302 m_log.Error("Illegal address. Please re-enter.");
379 } 303 }
380 304
381 return port; 305 return port;
@@ -386,8 +310,6 @@ namespace OpenSim.Framework.Console
386 public string PasswdPrompt(string prompt) 310 public string PasswdPrompt(string prompt)
387 { 311 {
388 // FIXME: Needs to be better abstracted 312 // FIXME: Needs to be better abstracted
389 Log.WriteLine(prompt);
390 Notice(prompt);
391 ConsoleColor oldfg = System.Console.ForegroundColor; 313 ConsoleColor oldfg = System.Console.ForegroundColor;
392 System.Console.ForegroundColor = System.Console.BackgroundColor; 314 System.Console.ForegroundColor = System.Console.BackgroundColor;
393 string temp = System.Console.ReadLine(); 315 string temp = System.Console.ReadLine();
@@ -398,7 +320,7 @@ namespace OpenSim.Framework.Console
398 // Displays a command prompt and waits for the user to enter a string, then returns that string 320 // Displays a command prompt and waits for the user to enter a string, then returns that string
399 public string CmdPrompt(string prompt) 321 public string CmdPrompt(string prompt)
400 { 322 {
401 Notice(String.Format("{0}: ", prompt)); 323 System.Console.WriteLine(String.Format("{0}: ", prompt));
402 return ReadLine(); 324 return ReadLine();
403 } 325 }
404 326
@@ -429,7 +351,7 @@ namespace OpenSim.Framework.Console
429 } 351 }
430 else 352 else
431 { 353 {
432 Notice("Valid options are " + OptionA + " or " + OptionB); 354 System.Console.WriteLine("Valid options are " + OptionA + " or " + OptionB);
433 temp = CmdPrompt(prompt, defaultresponse); 355 temp = CmdPrompt(prompt, defaultresponse);
434 } 356 }
435 } 357 }
@@ -439,23 +361,23 @@ namespace OpenSim.Framework.Console
439 // Runs a command with a number of parameters 361 // Runs a command with a number of parameters
440 public Object RunCmd(string Cmd, string[] cmdparams) 362 public Object RunCmd(string Cmd, string[] cmdparams)
441 { 363 {
442 cmdparser.RunCmd(Cmd, cmdparams); 364 m_cmdParser.RunCmd(Cmd, cmdparams);
443 return null; 365 return null;
444 } 366 }
445 367
446 // Shows data about something 368 // Shows data about something
447 public void ShowCommands(string ShowWhat) 369 public void ShowCommands(string ShowWhat)
448 { 370 {
449 cmdparser.Show(ShowWhat); 371 m_cmdParser.Show(ShowWhat);
450 } 372 }
451 373
452 public void MainLogPrompt() 374 public void Prompt()
453 { 375 {
454 string tempstr = CmdPrompt(componentname + "# "); 376 string tempstr = CmdPrompt(m_componentName + "# ");
455 MainLogRunCommand(tempstr); 377 RunCommand(tempstr);
456 } 378 }
457 379
458 public void MainLogRunCommand(string command) 380 public void RunCommand(string command)
459 { 381 {
460 string[] tempstrarray; 382 string[] tempstrarray;
461 tempstrarray = command.Split(' '); 383 tempstrarray = command.Split(' ');
@@ -470,7 +392,7 @@ namespace OpenSim.Framework.Console
470 } 392 }
471 catch (Exception e) 393 catch (Exception e)
472 { 394 {
473 MainLog.Instance.Error("Console", "Command failed with exception " + e.ToString()); 395 m_log.Error("[Console]: Command failed with exception " + e.ToString());
474 } 396 }
475 } 397 }
476 398
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainConsole.cs
index bea2a22..fb88d04 100644
--- a/OpenSim/Framework/Console/MainLog.cs
+++ b/OpenSim/Framework/Console/MainConsole.cs
@@ -25,13 +25,14 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
28namespace OpenSim.Framework.Console 29namespace OpenSim.Framework.Console
29{ 30{
30 public class MainLog 31 public class MainConsole
31 { 32 {
32 private static LogBase instance; 33 private static ConsoleBase instance;
33 34
34 public static LogBase Instance 35 public static ConsoleBase Instance
35 { 36 {
36 get { return instance; } 37 get { return instance; }
37 set { instance = value; } 38 set { instance = value; }
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
index 6059cbe..35a3635 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.DB4o
37 /// </summary> 37 /// </summary>
38 public class DB4oUserData : IUserData 38 public class DB4oUserData : IUserData
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 /// <summary> 42 /// <summary>
41 /// The database manager 43 /// The database manager
42 /// </summary> 44 /// </summary>
@@ -143,22 +145,22 @@ namespace OpenSim.Framework.Data.DB4o
143 145
144 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 146 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
145 { 147 {
146 //MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called"); 148 //m_log.Info("[FRIEND]: Stub AddNewUserFriend called");
147 } 149 }
148 150
149 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 151 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
150 { 152 {
151 //MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called"); 153 //m_log.Info("[FRIEND]: Stub RemoveUserFriend called");
152 } 154 }
153 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 155 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
154 { 156 {
155 //MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called"); 157 //m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called");
156 } 158 }
157 159
158 160
159 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 161 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
160 { 162 {
161 //MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called"); 163 //m_log.Info("[FRIEND]: Stub GetUserFriendList called");
162 return new List<FriendListItem>(); 164 return new List<FriendListItem>();
163 } 165 }
164 166
@@ -166,7 +168,7 @@ namespace OpenSim.Framework.Data.DB4o
166 168
167 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) 169 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
168 { 170 {
169 //MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 171 //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
170 } 172 }
171 173
172 174
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs
index 08fbef0..4d5e4c7 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MSSQL
37{ 37{
38 internal class MSSQLAssetData : IAssetProvider 38 internal class MSSQLAssetData : IAssetProvider
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 private MSSQLManager database; 42 private MSSQLManager database;
41 43
42 #region IAssetProvider Members 44 #region IAssetProvider Members
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MSSQL
46 // null as the version, indicates that the table didn't exist 48 // null as the version, indicates that the table didn't exist
47 if (tableName == null) 49 if (tableName == null)
48 { 50 {
49 MainLog.Instance.Notice("ASSETS", "Creating new database tables"); 51 m_log.Info("[ASSETS]: Creating new database tables");
50 database.ExecuteResourceSql("CreateAssetsTable.sql"); 52 database.ExecuteResourceSql("CreateAssetsTable.sql");
51 return; 53 return;
52 } 54 }
@@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MSSQL
164 } 166 }
165 catch (Exception e) 167 catch (Exception e)
166 { 168 {
167 MainLog.Instance.Error(e.ToString()); 169 m_log.Error(e.ToString());
168 } 170 }
169 } 171 }
170 172
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
index 7d228e6..28eec3e 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
@@ -40,6 +40,8 @@ namespace OpenSim.Framework.Data.MSSQL
40 /// </summary> 40 /// </summary>
41 public class SqlGridData : IGridData 41 public class SqlGridData : IGridData
42 { 42 {
43 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
44
43 /// <summary> 45 /// <summary>
44 /// Database manager 46 /// Database manager
45 /// </summary> 47 /// </summary>
@@ -172,7 +174,7 @@ namespace OpenSim.Framework.Data.MSSQL
172 catch (Exception e) 174 catch (Exception e)
173 { 175 {
174 database.Reconnect(); 176 database.Reconnect();
175 MainLog.Instance.Error(e.ToString()); 177 m_log.Error(e.ToString());
176 return returnlist; 178 return returnlist;
177 } 179 }
178 } 180 }
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MSSQL
208 catch (Exception e) 210 catch (Exception e)
209 { 211 {
210 database.Reconnect(); 212 database.Reconnect();
211 MainLog.Instance.Error(e.ToString()); 213 m_log.Error(e.ToString());
212 return returnlist; 214 return returnlist;
213 } 215 }
214 } 216 }
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
index 2e5d679..d79d369 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL
39 /// </summary> 39 /// </summary>
40 public class MSSQLInventoryData : IInventoryData 40 public class MSSQLInventoryData : IInventoryData
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 /// <summary> 44 /// <summary>
43 /// The database manager 45 /// The database manager
44 /// </summary> 46 /// </summary>
@@ -159,7 +161,7 @@ namespace OpenSim.Framework.Data.MSSQL
159 catch (Exception e) 161 catch (Exception e)
160 { 162 {
161 database.Reconnect(); 163 database.Reconnect();
162 MainLog.Instance.Error(e.ToString()); 164 m_log.Error(e.ToString());
163 return null; 165 return null;
164 } 166 }
165 } 167 }
@@ -198,7 +200,7 @@ namespace OpenSim.Framework.Data.MSSQL
198 catch (Exception e) 200 catch (Exception e)
199 { 201 {
200 database.Reconnect(); 202 database.Reconnect();
201 MainLog.Instance.Error(e.ToString()); 203 m_log.Error(e.ToString());
202 return null; 204 return null;
203 } 205 }
204 } 206 }
@@ -244,7 +246,7 @@ namespace OpenSim.Framework.Data.MSSQL
244 catch (Exception e) 246 catch (Exception e)
245 { 247 {
246 database.Reconnect(); 248 database.Reconnect();
247 MainLog.Instance.Error(e.ToString()); 249 m_log.Error(e.ToString());
248 return null; 250 return null;
249 } 251 }
250 } 252 }
@@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MSSQL
282 catch (Exception e) 284 catch (Exception e)
283 { 285 {
284 database.Reconnect(); 286 database.Reconnect();
285 MainLog.Instance.Error(e.ToString()); 287 m_log.Error(e.ToString());
286 return null; 288 return null;
287 } 289 }
288 } 290 }
@@ -315,7 +317,7 @@ namespace OpenSim.Framework.Data.MSSQL
315 } 317 }
316 catch (SqlException e) 318 catch (SqlException e)
317 { 319 {
318 MainLog.Instance.Error(e.ToString()); 320 m_log.Error(e.ToString());
319 } 321 }
320 322
321 return null; 323 return null;
@@ -352,7 +354,7 @@ namespace OpenSim.Framework.Data.MSSQL
352 catch (Exception e) 354 catch (Exception e)
353 { 355 {
354 database.Reconnect(); 356 database.Reconnect();
355 MainLog.Instance.Error(e.ToString()); 357 m_log.Error(e.ToString());
356 } 358 }
357 return null; 359 return null;
358 } 360 }
@@ -377,7 +379,7 @@ namespace OpenSim.Framework.Data.MSSQL
377 } 379 }
378 catch (Exception e) 380 catch (Exception e)
379 { 381 {
380 MainLog.Instance.Error(e.ToString()); 382 m_log.Error(e.ToString());
381 } 383 }
382 384
383 return null; 385 return null;
@@ -412,7 +414,7 @@ namespace OpenSim.Framework.Data.MSSQL
412 catch (Exception e) 414 catch (Exception e)
413 { 415 {
414 database.Reconnect(); 416 database.Reconnect();
415 MainLog.Instance.Error(e.ToString()); 417 m_log.Error(e.ToString());
416 return null; 418 return null;
417 } 419 }
418 } 420 }
@@ -452,7 +454,7 @@ namespace OpenSim.Framework.Data.MSSQL
452 } 454 }
453 catch (SqlException e) 455 catch (SqlException e)
454 { 456 {
455 MainLog.Instance.Error(e.ToString()); 457 m_log.Error(e.ToString());
456 } 458 }
457 } 459 }
458 460
@@ -511,7 +513,7 @@ namespace OpenSim.Framework.Data.MSSQL
511 } 513 }
512 catch (Exception e) 514 catch (Exception e)
513 { 515 {
514 MainLog.Instance.Error(e.ToString()); 516 m_log.Error(e.ToString());
515 } 517 }
516 } 518 }
517 519
@@ -533,7 +535,7 @@ namespace OpenSim.Framework.Data.MSSQL
533 catch (SqlException e) 535 catch (SqlException e)
534 { 536 {
535 database.Reconnect(); 537 database.Reconnect();
536 MainLog.Instance.Error(e.ToString()); 538 m_log.Error(e.ToString());
537 } 539 }
538 } 540 }
539 541
@@ -564,7 +566,7 @@ namespace OpenSim.Framework.Data.MSSQL
564 } 566 }
565 catch (Exception e) 567 catch (Exception e)
566 { 568 {
567 MainLog.Instance.Error(e.ToString()); 569 m_log.Error(e.ToString());
568 } 570 }
569 } 571 }
570 572
@@ -602,7 +604,7 @@ namespace OpenSim.Framework.Data.MSSQL
602 } 604 }
603 catch (Exception e) 605 catch (Exception e)
604 { 606 {
605 MainLog.Instance.Error(e.ToString()); 607 m_log.Error(e.ToString());
606 } 608 }
607 } 609 }
608 610
@@ -628,7 +630,7 @@ namespace OpenSim.Framework.Data.MSSQL
628 } 630 }
629 catch (Exception e) 631 catch (Exception e)
630 { 632 {
631 MainLog.Instance.Error(e.ToString()); 633 m_log.Error(e.ToString());
632 } 634 }
633 } 635 }
634 636
@@ -675,7 +677,7 @@ namespace OpenSim.Framework.Data.MSSQL
675 catch (SqlException e) 677 catch (SqlException e)
676 { 678 {
677 database.Reconnect(); 679 database.Reconnect();
678 MainLog.Instance.Error(e.ToString()); 680 m_log.Error(e.ToString());
679 } 681 }
680 } 682 }
681 683
@@ -695,7 +697,7 @@ namespace OpenSim.Framework.Data.MSSQL
695 catch (SqlException e) 697 catch (SqlException e)
696 { 698 {
697 database.Reconnect(); 699 database.Reconnect();
698 MainLog.Instance.Error(e.ToString()); 700 m_log.Error(e.ToString());
699 } 701 }
700 } 702 }
701 703
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
index 3a70909..e54cde1 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MSSQL
42 /// </summary> 42 /// </summary>
43 internal class MSSQLManager 43 internal class MSSQLManager
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 /// <summary> 47 /// <summary>
46 /// The database connection object 48 /// The database connection object
47 /// </summary> 49 /// </summary>
@@ -92,7 +94,7 @@ namespace OpenSim.Framework.Data.MSSQL
92 } 94 }
93 catch (Exception) 95 catch (Exception)
94 { 96 {
95 MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); 97 m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating");
96 InitDB(conn); 98 InitDB(conn);
97 } 99 }
98 cmd = Query("select top 1 webLoginKey from users", new Dictionary<string, string>()); 100 cmd = Query("select top 1 webLoginKey from users", new Dictionary<string, string>());
@@ -260,7 +262,7 @@ namespace OpenSim.Framework.Data.MSSQL
260 } 262 }
261 catch (Exception e) 263 catch (Exception e)
262 { 264 {
263 MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); 265 m_log.Error("Unable to reconnect to database " + e.ToString());
264 } 266 }
265 } 267 }
266 } 268 }
@@ -529,7 +531,7 @@ namespace OpenSim.Framework.Data.MSSQL
529 } 531 }
530 catch (Exception e) 532 catch (Exception e)
531 { 533 {
532 MainLog.Instance.Error("MSSQLManager : " + e.ToString()); 534 m_log.Error("MSSQLManager : " + e.ToString());
533 } 535 }
534 536
535 return returnval; 537 return returnval;
@@ -573,7 +575,7 @@ namespace OpenSim.Framework.Data.MSSQL
573 } 575 }
574 catch (Exception e) 576 catch (Exception e)
575 { 577 {
576 MainLog.Instance.Error(e.ToString()); 578 m_log.Error(e.ToString());
577 return false; 579 return false;
578 } 580 }
579 581
@@ -667,7 +669,7 @@ namespace OpenSim.Framework.Data.MSSQL
667 } 669 }
668 catch (Exception e) 670 catch (Exception e)
669 { 671 {
670 MainLog.Instance.Error(e.ToString()); 672 m_log.Error(e.ToString());
671 return false; 673 return false;
672 } 674 }
673 675
@@ -688,7 +690,7 @@ namespace OpenSim.Framework.Data.MSSQL
688 } 690 }
689 catch (Exception e) 691 catch (Exception e)
690 { 692 {
691 MainLog.Instance.Error("Unable to execute query " + e.ToString()); 693 m_log.Error("Unable to execute query " + e.ToString());
692 } 694 }
693 } 695 }
694 696
@@ -721,7 +723,7 @@ namespace OpenSim.Framework.Data.MSSQL
721 } 723 }
722 catch (Exception e) 724 catch (Exception e)
723 { 725 {
724 MainLog.Instance.Error(e.ToString()); 726 m_log.Error(e.ToString());
725 } 727 }
726 } 728 }
727 tables.Close(); 729 tables.Close();
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
index aa0526c..ed9929c 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL
39 /// </summary> 39 /// </summary>
40 internal class MSSQLUserData : IUserData 40 internal class MSSQLUserData : IUserData
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 /// <summary> 44 /// <summary>
43 /// Database manager for MySQL 45 /// Database manager for MySQL
44 /// </summary> 46 /// </summary>
@@ -94,7 +96,7 @@ namespace OpenSim.Framework.Data.MSSQL
94 catch (Exception e) 96 catch (Exception e)
95 { 97 {
96 database.Reconnect(); 98 database.Reconnect();
97 MainLog.Instance.Error(e.ToString()); 99 m_log.Error(e.ToString());
98 return null; 100 return null;
99 } 101 }
100 } 102 }
@@ -103,22 +105,22 @@ namespace OpenSim.Framework.Data.MSSQL
103 105
104 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 106 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
105 { 107 {
106 MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called"); 108 m_log.Info("[FRIEND]: Stub AddNewUserFriend called");
107 } 109 }
108 110
109 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 111 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
110 { 112 {
111 MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called"); 113 m_log.Info("[FRIEND]: Stub RemoveUserFriend called");
112 } 114 }
113 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 115 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
114 { 116 {
115 MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called"); 117 m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called");
116 } 118 }
117 119
118 120
119 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 121 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
120 { 122 {
121 MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called"); 123 m_log.Info("[FRIEND]: Stub GetUserFriendList called");
122 return new List<FriendListItem>(); 124 return new List<FriendListItem>();
123 } 125 }
124 126
@@ -126,7 +128,7 @@ namespace OpenSim.Framework.Data.MSSQL
126 128
127 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) 129 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
128 { 130 {
129 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 131 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
130 } 132 }
131 133
132 134
@@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MSSQL
168 catch (Exception e) 170 catch (Exception e)
169 { 171 {
170 database.Reconnect(); 172 database.Reconnect();
171 MainLog.Instance.Error(e.ToString()); 173 m_log.Error(e.ToString());
172 return returnlist; 174 return returnlist;
173 } 175 }
174 } 176 }
@@ -204,7 +206,7 @@ namespace OpenSim.Framework.Data.MSSQL
204 catch (Exception e) 206 catch (Exception e)
205 { 207 {
206 database.Reconnect(); 208 database.Reconnect();
207 MainLog.Instance.Error(e.ToString()); 209 m_log.Error(e.ToString());
208 return returnlist; 210 return returnlist;
209 } 211 }
210 } 212 }
@@ -235,7 +237,7 @@ namespace OpenSim.Framework.Data.MSSQL
235 catch (Exception e) 237 catch (Exception e)
236 { 238 {
237 database.Reconnect(); 239 database.Reconnect();
238 MainLog.Instance.Error(e.ToString()); 240 m_log.Error(e.ToString());
239 return null; 241 return null;
240 } 242 }
241 } 243 }
@@ -290,7 +292,7 @@ namespace OpenSim.Framework.Data.MSSQL
290 catch (Exception e) 292 catch (Exception e)
291 { 293 {
292 database.Reconnect(); 294 database.Reconnect();
293 MainLog.Instance.Error(e.ToString()); 295 m_log.Error(e.ToString());
294 return null; 296 return null;
295 } 297 }
296 } 298 }
@@ -324,7 +326,7 @@ namespace OpenSim.Framework.Data.MSSQL
324 catch (Exception e) 326 catch (Exception e)
325 { 327 {
326 database.Reconnect(); 328 database.Reconnect();
327 MainLog.Instance.Error(e.ToString()); 329 m_log.Error(e.ToString());
328 } 330 }
329 } 331 }
330 332
@@ -426,7 +428,7 @@ namespace OpenSim.Framework.Data.MSSQL
426 } 428 }
427 catch (Exception e) 429 catch (Exception e)
428 { 430 {
429 MainLog.Instance.Error(e.ToString()); 431 m_log.Error(e.ToString());
430 } 432 }
431 return false; 433 return false;
432 } 434 }
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
index 407d6d2..f9ef699 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MySQL
37{ 37{
38 internal class MySQLAssetData : IAssetProvider 38 internal class MySQLAssetData : IAssetProvider
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 private MySQLManager _dbConnection; 42 private MySQLManager _dbConnection;
41 43
42 #region IAssetProvider Members 44 #region IAssetProvider Members
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MySQL
46 // null as the version, indicates that the table didn't exist 48 // null as the version, indicates that the table didn't exist
47 if (oldVersion == null) 49 if (oldVersion == null)
48 { 50 {
49 MainLog.Instance.Notice("ASSETS", "Creating new database tables"); 51 m_log.Info("[ASSETS]: Creating new database tables");
50 _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); 52 _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql");
51 return; 53 return;
52 } 54 }
@@ -98,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL
98 } 100 }
99 catch (Exception e) 101 catch (Exception e)
100 { 102 {
101 MainLog.Instance.Error( 103 m_log.Error(String.Format(
102 "ASSETS", "MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() 104 "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString()
103 + Environment.NewLine + "Attempting reconnection", assetID); 105 + Environment.NewLine + "Attempting reconnection", assetID));
104 _dbConnection.Reconnect(); 106 _dbConnection.Reconnect();
105 } 107 }
106 } 108 }
@@ -137,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL
137 } 139 }
138 catch (Exception e) 140 catch (Exception e)
139 { 141 {
140 MainLog.Instance.Error( 142 m_log.Error(String.Format(
141 "ASSETS", 143 "[ASSETS]: " +
142 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() 144 "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString()
143 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); 145 + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name));
144 _dbConnection.Reconnect(); 146 _dbConnection.Reconnect();
145 } 147 }
146 } 148 }
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index 54f39bb..e2ea018 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
42{ 42{
43 public class MySQLDataStore : IRegionDataStore 43 public class MySQLDataStore : IRegionDataStore
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 private const string m_primSelect = "select * from prims"; 47 private const string m_primSelect = "select * from prims";
46 private const string m_shapeSelect = "select * from primshapes"; 48 private const string m_shapeSelect = "select * from primshapes";
47 private const string m_itemsSelect = "select * from primitems"; 49 private const string m_itemsSelect = "select * from primitems";
@@ -80,7 +82,7 @@ namespace OpenSim.Framework.Data.MySQL
80 m_dataSet = new DataSet(); 82 m_dataSet = new DataSet();
81 this.persistPrimInventories = persistPrimInventories; 83 this.persistPrimInventories = persistPrimInventories;
82 84
83 MainLog.Instance.Verbose("DATASTORE", "MySql - connecting: " + connectionstring); 85 m_log.Info("[DATASTORE]: MySql - connecting: " + connectionstring);
84 m_connection = new MySqlConnection(connectionstring); 86 m_connection = new MySqlConnection(connectionstring);
85 87
86 MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); 88 MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection);
@@ -148,12 +150,12 @@ namespace OpenSim.Framework.Data.MySQL
148 { 150 {
149 if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) 151 if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
150 { 152 {
151 MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); 153 m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
152 addPrim(prim, obj.UUID, regionUUID); 154 addPrim(prim, obj.UUID, regionUUID);
153 } 155 }
154 else 156 else
155 { 157 {
156 // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); 158 // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
157 } 159 }
158 } 160 }
159 } 161 }
@@ -163,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL
163 165
164 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 166 public void RemoveObject(LLUUID obj, LLUUID regionUUID)
165 { 167 {
166 MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 168 m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID));
167 169
168 DataTable prims = m_primTable; 170 DataTable prims = m_primTable;
169 DataTable shapes = m_shapeTable; 171 DataTable shapes = m_shapeTable;
@@ -228,7 +230,7 @@ namespace OpenSim.Framework.Data.MySQL
228 lock (m_dataSet) 230 lock (m_dataSet)
229 { 231 {
230 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); 232 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
231 MainLog.Instance.Verbose("DATASTORE", 233 m_log.Info("[DATASTORE]: " +
232 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 234 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
233 235
234 foreach (DataRow primRow in primsForRegion) 236 foreach (DataRow primRow in primsForRegion)
@@ -251,7 +253,7 @@ namespace OpenSim.Framework.Data.MySQL
251 } 253 }
252 else 254 else
253 { 255 {
254 MainLog.Instance.Notice( 256 m_log.Info(
255 "No shape found for prim in storage, so setting default box shape"); 257 "No shape found for prim in storage, so setting default box shape");
256 prim.Shape = PrimitiveBaseShape.Default; 258 prim.Shape = PrimitiveBaseShape.Default;
257 } 259 }
@@ -270,7 +272,7 @@ namespace OpenSim.Framework.Data.MySQL
270 } 272 }
271 else 273 else
272 { 274 {
273 MainLog.Instance.Notice( 275 m_log.Info(
274 "No shape found for prim in storage, so setting default box shape"); 276 "No shape found for prim in storage, so setting default box shape");
275 prim.Shape = PrimitiveBaseShape.Default; 277 prim.Shape = PrimitiveBaseShape.Default;
276 } 278 }
@@ -284,11 +286,11 @@ namespace OpenSim.Framework.Data.MySQL
284 } 286 }
285 catch (Exception e) 287 catch (Exception e)
286 { 288 {
287 MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); 289 m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows");
288 MainLog.Instance.Verbose("DATASTORE", e.ToString()); 290 m_log.Info("[DATASTORE]: " + e.ToString());
289 foreach (DataColumn col in prims.Columns) 291 foreach (DataColumn col in prims.Columns)
290 { 292 {
291 MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); 293 m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]);
292 } 294 }
293 } 295 }
294 } 296 }
@@ -302,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL
302 /// <param name="prim"></param> 304 /// <param name="prim"></param>
303 private void LoadItems(SceneObjectPart prim) 305 private void LoadItems(SceneObjectPart prim)
304 { 306 {
305 //MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID); 307 //m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID));
306 308
307 DataTable dbItems = m_itemsTable; 309 DataTable dbItems = m_itemsTable;
308 310
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL
316 TaskInventoryItem item = buildItem(row); 318 TaskInventoryItem item = buildItem(row);
317 inventory.Add(item); 319 inventory.Add(item);
318 320
319 MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID); 321 m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID));
320 } 322 }
321 323
322 prim.RestoreInventoryItems(inventory); 324 prim.RestoreInventoryItems(inventory);
@@ -332,7 +334,7 @@ namespace OpenSim.Framework.Data.MySQL
332 public void StoreTerrain(double[,] ter, LLUUID regionID) 334 public void StoreTerrain(double[,] ter, LLUUID regionID)
333 { 335 {
334 int revision = Util.UnixTimeSinceEpoch(); 336 int revision = Util.UnixTimeSinceEpoch();
335 MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); 337 m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString());
336 338
337 DataTable terrain = m_dataSet.Tables["terrain"]; 339 DataTable terrain = m_dataSet.Tables["terrain"];
338 lock (m_dataSet) 340 lock (m_dataSet)
@@ -384,11 +386,11 @@ namespace OpenSim.Framework.Data.MySQL
384 } 386 }
385 else 387 else
386 { 388 {
387 MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); 389 m_log.Info("[DATASTORE]: No terrain found for region");
388 return null; 390 return null;
389 } 391 }
390 392
391 MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); 393 m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString());
392 } 394 }
393 395
394 return terret; 396 return terret;
@@ -418,7 +420,7 @@ namespace OpenSim.Framework.Data.MySQL
418 public void StoreLandObject(Land parcel, LLUUID regionUUID) 420 public void StoreLandObject(Land parcel, LLUUID regionUUID)
419 { 421 {
420 // Does the new locking fix it? 422 // Does the new locking fix it?
421 MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); 423 m_log.Info("[DATASTORE]: Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))");
422 System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); 424 System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900));
423 425
424 lock (m_dataSet) 426 lock (m_dataSet)
@@ -1214,7 +1216,7 @@ namespace OpenSim.Framework.Data.MySQL
1214 if (!persistPrimInventories) 1216 if (!persistPrimInventories)
1215 return; 1217 return;
1216 1218
1217 MainLog.Instance.Verbose("DATASTORE", "Persisting Prim Inventory with prim ID {0}", primID); 1219 m_log.Info(String.Format("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID));
1218 1220
1219 // For now, we're just going to crudely remove all the previous inventory items 1221 // For now, we're just going to crudely remove all the previous inventory items
1220 // no matter whether they have changed or not, and replace them with the current set. 1222 // no matter whether they have changed or not, and replace them with the current set.
@@ -1225,10 +1227,10 @@ namespace OpenSim.Framework.Data.MySQL
1225 // repalce with current inventory details 1227 // repalce with current inventory details
1226 foreach (TaskInventoryItem newItem in items) 1228 foreach (TaskInventoryItem newItem in items)
1227 { 1229 {
1228// MainLog.Instance.Verbose( 1230// m_log.Info(String.Format(
1229// "DATASTORE", 1231// "[DATASTORE]: " +
1230// "Adding item {0}, {1} to prim ID {2}", 1232// "Adding item {0}, {1} to prim ID {2}",
1231// newItem.Name, newItem.ItemID, newItem.ParentPartID); 1233// newItem.Name, newItem.ItemID, newItem.ParentPartID));
1232 1234
1233 DataRow newItemRow = m_itemsTable.NewRow(); 1235 DataRow newItemRow = m_itemsTable.NewRow();
1234 fillItemRow(newItemRow, newItem); 1236 fillItemRow(newItemRow, newItem);
@@ -1332,7 +1334,7 @@ namespace OpenSim.Framework.Data.MySQL
1332 sql += subsql; 1334 sql += subsql;
1333 sql += ")"; 1335 sql += ")";
1334 1336
1335 //MainLog.Instance.Verbose("DATASTORE", "defineTable() sql {0}", sql); 1337 //m_log.Info(String.Format("[DATASTORE]: defineTable() sql {0}", sql));
1336 1338
1337 return sql; 1339 return sql;
1338 } 1340 }
@@ -1463,8 +1465,8 @@ namespace OpenSim.Framework.Data.MySQL
1463 } 1465 }
1464 catch (Exception ex) 1466 catch (Exception ex)
1465 { 1467 {
1466 MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message); 1468 m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message);
1467 MainLog.Instance.Error("MySql", "Application is terminating!"); 1469 m_log.Error("[MySql]: Application is terminating!");
1468 System.Threading.Thread.CurrentThread.Abort(); 1470 System.Threading.Thread.CurrentThread.Abort();
1469 } 1471 }
1470 } 1472 }
@@ -1475,7 +1477,7 @@ namespace OpenSim.Framework.Data.MySQL
1475 } 1477 }
1476 catch (MySqlException e) 1478 catch (MySqlException e)
1477 { 1479 {
1478 MainLog.Instance.Warn("MySql", "Primitives Table Already Exists: {0}", e); 1480 m_log.Warn(String.Format("[MySql]: Primitives Table Already Exists: {0}", e));
1479 } 1481 }
1480 1482
1481 try 1483 try
@@ -1484,7 +1486,7 @@ namespace OpenSim.Framework.Data.MySQL
1484 } 1486 }
1485 catch (MySqlException e) 1487 catch (MySqlException e)
1486 { 1488 {
1487 MainLog.Instance.Warn("MySql", "Shapes Table Already Exists: {0}", e); 1489 m_log.Warn(String.Format("[MySql]: Shapes Table Already Exists: {0}", e));
1488 } 1490 }
1489 1491
1490 try 1492 try
@@ -1493,7 +1495,7 @@ namespace OpenSim.Framework.Data.MySQL
1493 } 1495 }
1494 catch (MySqlException e) 1496 catch (MySqlException e)
1495 { 1497 {
1496 MainLog.Instance.Warn("MySql", "Items Table Already Exists: {0}", e); 1498 m_log.Warn(String.Format("[MySql]: Items Table Already Exists: {0}", e));
1497 } 1499 }
1498 1500
1499 try 1501 try
@@ -1502,7 +1504,7 @@ namespace OpenSim.Framework.Data.MySQL
1502 } 1504 }
1503 catch (MySqlException e) 1505 catch (MySqlException e)
1504 { 1506 {
1505 MainLog.Instance.Warn("MySql", "Terrain Table Already Exists: {0}", e); 1507 m_log.Warn(String.Format("[MySql]: Terrain Table Already Exists: {0}", e));
1506 } 1508 }
1507 1509
1508 try 1510 try
@@ -1511,7 +1513,7 @@ namespace OpenSim.Framework.Data.MySQL
1511 } 1513 }
1512 catch (MySqlException e) 1514 catch (MySqlException e)
1513 { 1515 {
1514 MainLog.Instance.Warn("MySql", "Land Table Already Exists: {0}", e); 1516 m_log.Warn(String.Format("[MySql]: Land Table Already Exists: {0}", e));
1515 } 1517 }
1516 1518
1517 try 1519 try
@@ -1520,7 +1522,7 @@ namespace OpenSim.Framework.Data.MySQL
1520 } 1522 }
1521 catch (MySqlException e) 1523 catch (MySqlException e)
1522 { 1524 {
1523 MainLog.Instance.Warn("MySql", "LandAccessList Table Already Exists: {0}", e); 1525 m_log.Warn(String.Format("[MySql]: LandAccessList Table Already Exists: {0}", e));
1524 } 1526 }
1525 conn.Close(); 1527 conn.Close();
1526 } 1528 }
@@ -1555,7 +1557,7 @@ namespace OpenSim.Framework.Data.MySQL
1555 } 1557 }
1556 catch (MySqlException) 1558 catch (MySqlException)
1557 { 1559 {
1558 MainLog.Instance.Verbose("DATASTORE", "MySql Database doesn't exist... creating"); 1560 m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating");
1559 InitDB(conn); 1561 InitDB(conn);
1560 } 1562 }
1561 1563
@@ -1573,7 +1575,7 @@ namespace OpenSim.Framework.Data.MySQL
1573 { 1575 {
1574 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) 1576 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
1575 { 1577 {
1576 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 1578 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
1577 return false; 1579 return false;
1578 } 1580 }
1579 } 1581 }
@@ -1582,7 +1584,7 @@ namespace OpenSim.Framework.Data.MySQL
1582 { 1584 {
1583 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) 1585 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
1584 { 1586 {
1585 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 1587 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
1586 return false; 1588 return false;
1587 } 1589 }
1588 } 1590 }
@@ -1593,7 +1595,7 @@ namespace OpenSim.Framework.Data.MySQL
1593 { 1595 {
1594 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) 1596 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
1595 { 1597 {
1596 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1598 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1597 return false; 1599 return false;
1598 } 1600 }
1599 } 1601 }
@@ -1602,7 +1604,7 @@ namespace OpenSim.Framework.Data.MySQL
1602 { 1604 {
1603 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) 1605 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
1604 { 1606 {
1605 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1607 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1606 return false; 1608 return false;
1607 } 1609 }
1608 } 1610 }
@@ -1611,7 +1613,7 @@ namespace OpenSim.Framework.Data.MySQL
1611 { 1613 {
1612 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) 1614 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
1613 { 1615 {
1614 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1616 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1615 return false; 1617 return false;
1616 } 1618 }
1617 } 1619 }
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
index c8c4ab0..d62c286 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
42 /// </summary> 42 /// </summary>
43 public class MySQLGridData : IGridData 43 public class MySQLGridData : IGridData
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 /// <summary> 47 /// <summary>
46 /// MySQL Database Manager 48 /// MySQL Database Manager
47 /// </summary> 49 /// </summary>
@@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MySQL
168 catch (Exception e) 170 catch (Exception e)
169 { 171 {
170 database.Reconnect(); 172 database.Reconnect();
171 MainLog.Instance.Error(e.ToString()); 173 m_log.Error(e.ToString());
172 return null; 174 return null;
173 } 175 }
174 } 176 }
@@ -200,7 +202,7 @@ namespace OpenSim.Framework.Data.MySQL
200 catch (Exception e) 202 catch (Exception e)
201 { 203 {
202 database.Reconnect(); 204 database.Reconnect();
203 MainLog.Instance.Error(e.ToString()); 205 m_log.Error(e.ToString());
204 return null; 206 return null;
205 } 207 }
206 } 208 }
@@ -247,7 +249,7 @@ namespace OpenSim.Framework.Data.MySQL
247 catch (Exception e) 249 catch (Exception e)
248 { 250 {
249 database.Reconnect(); 251 database.Reconnect();
250 MainLog.Instance.Error(e.ToString()); 252 m_log.Error(e.ToString());
251 return returnlist; 253 return returnlist;
252 } 254 }
253 } 255 }
@@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MySQL
282 catch (Exception e) 284 catch (Exception e)
283 { 285 {
284 database.Reconnect(); 286 database.Reconnect();
285 MainLog.Instance.Error(e.ToString()); 287 m_log.Error(e.ToString());
286 return returnlist; 288 return returnlist;
287 } 289 }
288 } 290 }
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL
316 catch (Exception e) 318 catch (Exception e)
317 { 319 {
318 database.Reconnect(); 320 database.Reconnect();
319 MainLog.Instance.Error(e.ToString()); 321 m_log.Error(e.ToString());
320 return null; 322 return null;
321 } 323 }
322 } 324 }
@@ -405,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL
405 catch (Exception e) 407 catch (Exception e)
406 { 408 {
407 database.Reconnect(); 409 database.Reconnect();
408 MainLog.Instance.Error(e.ToString()); 410 m_log.Error(e.ToString());
409 return null; 411 return null;
410 } 412 }
411 } 413 }
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
index c317f4a..57c2c9f 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
@@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.MySQL
38 /// </summary> 38 /// </summary>
39 public class MySQLInventoryData : IInventoryData 39 public class MySQLInventoryData : IInventoryData
40 { 40 {
41 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42
41 /// <summary> 43 /// <summary>
42 /// The database manager 44 /// The database manager
43 /// </summary> 45 /// </summary>
@@ -104,8 +106,8 @@ namespace OpenSim.Framework.Data.MySQL
104 tableList["inventoryitems"] = null; 106 tableList["inventoryitems"] = null;
105 107
106 database.GetTableVersion(tableList); 108 database.GetTableVersion(tableList);
107 MainLog.Instance.Verbose("MYSQL", "Inventory Folder Version: " + tableList["inventoryfolders"]); 109 m_log.Info("[MYSQL]: Inventory Folder Version: " + tableList["inventoryfolders"]);
108 MainLog.Instance.Verbose("MYSQL", "Inventory Items Version: " + tableList["inventoryitems"]); 110 m_log.Info("[MYSQL]: Inventory Items Version: " + tableList["inventoryitems"]);
109 111
110 UpgradeFoldersTable(tableList["inventoryfolders"]); 112 UpgradeFoldersTable(tableList["inventoryfolders"]);
111 UpgradeItemsTable(tableList["inventoryitems"]); 113 UpgradeItemsTable(tableList["inventoryitems"]);
@@ -170,7 +172,7 @@ namespace OpenSim.Framework.Data.MySQL
170 catch (Exception e) 172 catch (Exception e)
171 { 173 {
172 database.Reconnect(); 174 database.Reconnect();
173 MainLog.Instance.Error(e.ToString()); 175 m_log.Error(e.ToString());
174 return null; 176 return null;
175 } 177 }
176 } 178 }
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL
208 catch (Exception e) 210 catch (Exception e)
209 { 211 {
210 database.Reconnect(); 212 database.Reconnect();
211 MainLog.Instance.Error(e.ToString()); 213 m_log.Error(e.ToString());
212 return null; 214 return null;
213 } 215 }
214 } 216 }
@@ -254,7 +256,7 @@ namespace OpenSim.Framework.Data.MySQL
254 catch (Exception e) 256 catch (Exception e)
255 { 257 {
256 database.Reconnect(); 258 database.Reconnect();
257 MainLog.Instance.Error(e.ToString()); 259 m_log.Error(e.ToString());
258 return null; 260 return null;
259 } 261 }
260 } 262 }
@@ -292,7 +294,7 @@ namespace OpenSim.Framework.Data.MySQL
292 catch (Exception e) 294 catch (Exception e)
293 { 295 {
294 database.Reconnect(); 296 database.Reconnect();
295 MainLog.Instance.Error(e.ToString()); 297 m_log.Error(e.ToString());
296 return null; 298 return null;
297 } 299 }
298 } 300 }
@@ -325,7 +327,7 @@ namespace OpenSim.Framework.Data.MySQL
325 } 327 }
326 catch (MySqlException e) 328 catch (MySqlException e)
327 { 329 {
328 MainLog.Instance.Error(e.ToString()); 330 m_log.Error(e.ToString());
329 } 331 }
330 332
331 return null; 333 return null;
@@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.MySQL
362 catch (Exception e) 364 catch (Exception e)
363 { 365 {
364 database.Reconnect(); 366 database.Reconnect();
365 MainLog.Instance.Error(e.ToString()); 367 m_log.Error(e.ToString());
366 } 368 }
367 return null; 369 return null;
368 } 370 }
@@ -387,7 +389,7 @@ namespace OpenSim.Framework.Data.MySQL
387 } 389 }
388 catch (Exception e) 390 catch (Exception e)
389 { 391 {
390 MainLog.Instance.Error(e.ToString()); 392 m_log.Error(e.ToString());
391 } 393 }
392 394
393 return null; 395 return null;
@@ -421,7 +423,7 @@ namespace OpenSim.Framework.Data.MySQL
421 catch (Exception e) 423 catch (Exception e)
422 { 424 {
423 database.Reconnect(); 425 database.Reconnect();
424 MainLog.Instance.Error(e.ToString()); 426 m_log.Error(e.ToString());
425 return null; 427 return null;
426 } 428 }
427 } 429 }
@@ -459,7 +461,7 @@ namespace OpenSim.Framework.Data.MySQL
459 } 461 }
460 catch (MySqlException e) 462 catch (MySqlException e)
461 { 463 {
462 MainLog.Instance.Error(e.ToString()); 464 m_log.Error(e.ToString());
463 } 465 }
464 } 466 }
465 467
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL
488 catch (MySqlException e) 490 catch (MySqlException e)
489 { 491 {
490 database.Reconnect(); 492 database.Reconnect();
491 MainLog.Instance.Error(e.ToString()); 493 m_log.Error(e.ToString());
492 } 494 }
493 } 495 }
494 496
@@ -516,7 +518,7 @@ namespace OpenSim.Framework.Data.MySQL
516 } 518 }
517 catch (Exception e) 519 catch (Exception e)
518 { 520 {
519 MainLog.Instance.Error(e.ToString()); 521 m_log.Error(e.ToString());
520 } 522 }
521 } 523 }
522 524
@@ -548,7 +550,7 @@ namespace OpenSim.Framework.Data.MySQL
548 } 550 }
549 catch (Exception e) 551 catch (Exception e)
550 { 552 {
551 MainLog.Instance.Error(e.ToString()); 553 m_log.Error(e.ToString());
552 } 554 }
553 } 555 }
554 556
@@ -593,7 +595,7 @@ namespace OpenSim.Framework.Data.MySQL
593 catch (MySqlException e) 595 catch (MySqlException e)
594 { 596 {
595 database.Reconnect(); 597 database.Reconnect();
596 MainLog.Instance.Error(e.ToString()); 598 m_log.Error(e.ToString());
597 } 599 }
598 } 600 }
599 601
@@ -609,7 +611,7 @@ namespace OpenSim.Framework.Data.MySQL
609 catch (MySqlException e) 611 catch (MySqlException e)
610 { 612 {
611 database.Reconnect(); 613 database.Reconnect();
612 MainLog.Instance.Error(e.ToString()); 614 m_log.Error(e.ToString());
613 } 615 }
614 } 616 }
615 617
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
index 3df0242..f70b505 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL
42 /// </summary> 42 /// </summary>
43 internal class MySQLManager 43 internal class MySQLManager
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 /// <summary> 47 /// <summary>
46 /// The database connection object 48 /// The database connection object
47 /// </summary> 49 /// </summary>
@@ -71,7 +73,7 @@ namespace OpenSim.Framework.Data.MySQL
71 73
72 dbcon.Open(); 74 dbcon.Open();
73 75
74 MainLog.Instance.Verbose("MYSQL", "Connection established"); 76 m_log.Info("[MYSQL]: Connection established");
75 } 77 }
76 catch (Exception e) 78 catch (Exception e)
77 { 79 {
@@ -113,7 +115,7 @@ namespace OpenSim.Framework.Data.MySQL
113 } 115 }
114 catch (Exception e) 116 catch (Exception e)
115 { 117 {
116 MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); 118 m_log.Error("Unable to reconnect to database " + e.ToString());
117 } 119 }
118 } 120 }
119 } 121 }
@@ -194,7 +196,7 @@ namespace OpenSim.Framework.Data.MySQL
194 } 196 }
195 catch (Exception e) 197 catch (Exception e)
196 { 198 {
197 MainLog.Instance.Error(e.ToString()); 199 m_log.Error(e.ToString());
198 } 200 }
199 } 201 }
200 tables.Close(); 202 tables.Close();
@@ -245,7 +247,7 @@ namespace OpenSim.Framework.Data.MySQL
245 } 247 }
246 catch (Exception e) 248 catch (Exception e)
247 { 249 {
248 MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); 250 m_log.Error("Unable to reconnect to database " + e.ToString());
249 } 251 }
250 252
251 // Run the query again 253 // Run the query again
@@ -263,7 +265,7 @@ namespace OpenSim.Framework.Data.MySQL
263 catch (Exception e) 265 catch (Exception e)
264 { 266 {
265 // Return null if it fails. 267 // Return null if it fails.
266 MainLog.Instance.Error("Failed during Query generation: " + e.ToString()); 268 m_log.Error("Failed during Query generation: " + e.ToString());
267 return null; 269 return null;
268 } 270 }
269 } 271 }
@@ -523,7 +525,7 @@ namespace OpenSim.Framework.Data.MySQL
523 } 525 }
524 catch (Exception e) 526 catch (Exception e)
525 { 527 {
526 MainLog.Instance.Error(e.ToString()); 528 m_log.Error(e.ToString());
527 return false; 529 return false;
528 } 530 }
529 531
@@ -617,7 +619,7 @@ namespace OpenSim.Framework.Data.MySQL
617 } 619 }
618 catch (Exception e) 620 catch (Exception e)
619 { 621 {
620 MainLog.Instance.Error(e.ToString()); 622 m_log.Error(e.ToString());
621 return false; 623 return false;
622 } 624 }
623 625
@@ -726,7 +728,7 @@ namespace OpenSim.Framework.Data.MySQL
726 } 728 }
727 catch (Exception e) 729 catch (Exception e)
728 { 730 {
729 MainLog.Instance.Error(e.ToString()); 731 m_log.Error(e.ToString());
730 return false; 732 return false;
731 } 733 }
732 734
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
index 2ee20e0..0db727c 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MySQL
39 /// </summary> 39 /// </summary>
40 internal class MySQLUserData : IUserData 40 internal class MySQLUserData : IUserData
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 /// <summary> 44 /// <summary>
43 /// Database manager for MySQL 45 /// Database manager for MySQL
44 /// </summary> 46 /// </summary>
@@ -119,7 +121,7 @@ namespace OpenSim.Framework.Data.MySQL
119 database.ExecuteResourceSql("UpgradeUsersTableToVersion2.sql"); 121 database.ExecuteResourceSql("UpgradeUsersTableToVersion2.sql");
120 return; 122 return;
121 } 123 }
122 //MainLog.Instance.Verbose("DB","DBVers:" + oldVersion); 124 //m_log.Info("[DB]: DBVers:" + oldVersion);
123 } 125 }
124 126
125 /// <summary> 127 /// <summary>
@@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MySQL
164 catch (Exception e) 166 catch (Exception e)
165 { 167 {
166 database.Reconnect(); 168 database.Reconnect();
167 MainLog.Instance.Error(e.ToString()); 169 m_log.Error(e.ToString());
168 return null; 170 return null;
169 } 171 }
170 } 172 }
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL
208 catch (Exception e) 210 catch (Exception e)
209 { 211 {
210 database.Reconnect(); 212 database.Reconnect();
211 MainLog.Instance.Error(e.ToString()); 213 m_log.Error(e.ToString());
212 return; 214 return;
213 } 215 }
214 } 216 }
@@ -243,7 +245,7 @@ namespace OpenSim.Framework.Data.MySQL
243 catch (Exception e) 245 catch (Exception e)
244 { 246 {
245 database.Reconnect(); 247 database.Reconnect();
246 MainLog.Instance.Error(e.ToString()); 248 m_log.Error(e.ToString());
247 return; 249 return;
248 } 250 }
249 } 251 }
@@ -272,7 +274,7 @@ namespace OpenSim.Framework.Data.MySQL
272 catch (Exception e) 274 catch (Exception e)
273 { 275 {
274 database.Reconnect(); 276 database.Reconnect();
275 MainLog.Instance.Error(e.ToString()); 277 m_log.Error(e.ToString());
276 return; 278 return;
277 } 279 }
278 } 280 }
@@ -317,7 +319,7 @@ namespace OpenSim.Framework.Data.MySQL
317 catch (Exception e) 319 catch (Exception e)
318 { 320 {
319 database.Reconnect(); 321 database.Reconnect();
320 MainLog.Instance.Error(e.ToString()); 322 m_log.Error(e.ToString());
321 return Lfli; 323 return Lfli;
322 } 324 }
323 325
@@ -328,7 +330,7 @@ namespace OpenSim.Framework.Data.MySQL
328 330
329 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) 331 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
330 { 332 {
331 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 333 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
332 } 334 }
333 335
334 336
@@ -371,7 +373,7 @@ namespace OpenSim.Framework.Data.MySQL
371 catch (Exception e) 373 catch (Exception e)
372 { 374 {
373 database.Reconnect(); 375 database.Reconnect();
374 MainLog.Instance.Error(e.ToString()); 376 m_log.Error(e.ToString());
375 return returnlist; 377 return returnlist;
376 } 378 }
377 } 379 }
@@ -406,7 +408,7 @@ namespace OpenSim.Framework.Data.MySQL
406 catch (Exception e) 408 catch (Exception e)
407 { 409 {
408 database.Reconnect(); 410 database.Reconnect();
409 MainLog.Instance.Error(e.ToString()); 411 m_log.Error(e.ToString());
410 return returnlist; 412 return returnlist;
411 } 413 }
412 } 414 }
@@ -437,7 +439,7 @@ namespace OpenSim.Framework.Data.MySQL
437 catch (Exception e) 439 catch (Exception e)
438 { 440 {
439 database.Reconnect(); 441 database.Reconnect();
440 MainLog.Instance.Error(e.ToString()); 442 m_log.Error(e.ToString());
441 return null; 443 return null;
442 } 444 }
443 } 445 }
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL
488 catch (Exception e) 490 catch (Exception e)
489 { 491 {
490 database.Reconnect(); 492 database.Reconnect();
491 MainLog.Instance.Error(e.ToString()); 493 m_log.Error(e.ToString());
492 return; 494 return;
493 } 495 }
494 496
@@ -525,7 +527,7 @@ namespace OpenSim.Framework.Data.MySQL
525 catch (Exception e) 527 catch (Exception e)
526 { 528 {
527 database.Reconnect(); 529 database.Reconnect();
528 MainLog.Instance.Error(e.ToString()); 530 m_log.Error(e.ToString());
529 return null; 531 return null;
530 } 532 }
531 } 533 }
@@ -553,7 +555,7 @@ namespace OpenSim.Framework.Data.MySQL
553 catch (Exception e) 555 catch (Exception e)
554 { 556 {
555 database.Reconnect(); 557 database.Reconnect();
556 MainLog.Instance.Error(e.ToString()); 558 m_log.Error(e.ToString());
557 } 559 }
558 } 560 }
559 561
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index 76608c7..d08ef8b 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite
39 /// </summary> 39 /// </summary>
40 public class SQLiteAssetData : SQLiteBase, IAssetProvider 40 public class SQLiteAssetData : SQLiteBase, IAssetProvider
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 /// <summary> 44 /// <summary>
43 /// The database manager 45 /// The database manager
44 /// </summary> 46 /// </summary>
@@ -86,10 +88,10 @@ namespace OpenSim.Framework.Data.SQLite
86 88
87 public void CreateAsset(AssetBase asset) 89 public void CreateAsset(AssetBase asset)
88 { 90 {
89 MainLog.Instance.Verbose("SQLITE", "Creating Asset " + Util.ToRawUuidString(asset.FullID)); 91 m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID));
90 if (ExistsAsset(asset.FullID)) 92 if (ExistsAsset(asset.FullID))
91 { 93 {
92 MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!"); 94 m_log.Info("[SQLITE]: Asset exists, updating instead. You should fix the caller for this!");
93 UpdateAsset(asset); 95 UpdateAsset(asset);
94 } 96 }
95 else 97 else
@@ -135,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite
135 string temporary = asset.Temporary ? "Temporary" : "Stored"; 137 string temporary = asset.Temporary ? "Temporary" : "Stored";
136 string local = asset.Local ? "Local" : "Remote"; 138 string local = asset.Local ? "Local" : "Remote";
137 139
138 MainLog.Instance.Verbose("SQLITE", 140 m_log.Info("[SQLITE]: " +
139 string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", 141 string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)",
140 asset.FullID, asset.Name, asset.Description, asset.Type, 142 asset.FullID, asset.Name, asset.Description, asset.Type,
141 asset.InvType, temporary, local, asset.Data.Length)); 143 asset.InvType, temporary, local, asset.Data.Length));
@@ -174,7 +176,7 @@ namespace OpenSim.Framework.Data.SQLite
174 176
175 public void CommitAssets() // force a sync to the database 177 public void CommitAssets() // force a sync to the database
176 { 178 {
177 MainLog.Instance.Verbose("SQLITE", "Attempting commit"); 179 m_log.Info("[SQLITE]: Attempting commit");
178 // lock (ds) 180 // lock (ds)
179 // { 181 // {
180 // da.Update(ds, "assets"); 182 // da.Update(ds, "assets");
@@ -261,7 +263,7 @@ namespace OpenSim.Framework.Data.SQLite
261 } 263 }
262 catch (SqliteSyntaxException) 264 catch (SqliteSyntaxException)
263 { 265 {
264 MainLog.Instance.Verbose("SQLITE", "SQLite Database doesn't exist... creating"); 266 m_log.Info("[SQLITE]: SQLite Database doesn't exist... creating");
265 InitDB(conn); 267 InitDB(conn);
266 } 268 }
267 return true; 269 return true;
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
index 64a27f0..5e5d1e4 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs
@@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.SQLite
38{ 38{
39 public class SQLiteInventoryStore : SQLiteBase, IInventoryData 39 public class SQLiteInventoryStore : SQLiteBase, IInventoryData
40 { 40 {
41 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42
41 private const string invItemsSelect = "select * from inventoryitems"; 43 private const string invItemsSelect = "select * from inventoryitems";
42 private const string invFoldersSelect = "select * from inventoryfolders"; 44 private const string invFoldersSelect = "select * from inventoryfolders";
43 45
@@ -57,7 +59,7 @@ namespace OpenSim.Framework.Data.SQLite
57 { 59 {
58 string connectionString = "URI=file:" + dbfile + ",version=3"; 60 string connectionString = "URI=file:" + dbfile + ",version=3";
59 61
60 MainLog.Instance.Verbose("Inventory", "Sqlite - connecting: " + dbfile); 62 m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile);
61 SqliteConnection conn = new SqliteConnection(connectionString); 63 SqliteConnection conn = new SqliteConnection(connectionString);
62 64
63 TestTables(conn); 65 TestTables(conn);
@@ -74,12 +76,12 @@ namespace OpenSim.Framework.Data.SQLite
74 ds.Tables.Add(createInventoryFoldersTable()); 76 ds.Tables.Add(createInventoryFoldersTable());
75 invFoldersDa.Fill(ds.Tables["inventoryfolders"]); 77 invFoldersDa.Fill(ds.Tables["inventoryfolders"]);
76 setupFoldersCommands(invFoldersDa, conn); 78 setupFoldersCommands(invFoldersDa, conn);
77 MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Folders Definitions"); 79 m_log.Info("[DATASTORE]: Populated Intentory Folders Definitions");
78 80
79 ds.Tables.Add(createInventoryItemsTable()); 81 ds.Tables.Add(createInventoryItemsTable());
80 invItemsDa.Fill(ds.Tables["inventoryitems"]); 82 invItemsDa.Fill(ds.Tables["inventoryitems"]);
81 setupItemsCommands(invItemsDa, conn); 83 setupItemsCommands(invItemsDa, conn);
82 MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions"); 84 m_log.Info("[DATASTORE]: Populated Intentory Items Definitions");
83 85
84 ds.AcceptChanges(); 86 ds.AcceptChanges();
85 } 87 }
@@ -603,7 +605,7 @@ namespace OpenSim.Framework.Data.SQLite
603 } 605 }
604 catch (SqliteSyntaxException) 606 catch (SqliteSyntaxException)
605 { 607 {
606 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 608 m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
607 InitDB(conn); 609 InitDB(conn);
608 } 610 }
609 611
@@ -614,7 +616,7 @@ namespace OpenSim.Framework.Data.SQLite
614 { 616 {
615 if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) 617 if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName))
616 { 618 {
617 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 619 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
618 return false; 620 return false;
619 } 621 }
620 } 622 }
@@ -622,7 +624,7 @@ namespace OpenSim.Framework.Data.SQLite
622 { 624 {
623 if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) 625 if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName))
624 { 626 {
625 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 627 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
626 return false; 628 return false;
627 } 629 }
628 } 630 }
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index a97b146..c77a8f6 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.SQLite
37{ 37{
38 internal class SQLiteManager : SQLiteBase 38 internal class SQLiteManager : SQLiteBase
39 { 39 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
41
40 private IDbConnection dbcon; 42 private IDbConnection dbcon;
41 43
42 /// <summary> 44 /// <summary>
@@ -101,7 +103,7 @@ namespace OpenSim.Framework.Data.SQLite
101 } 103 }
102 catch (SqliteSyntaxException) 104 catch (SqliteSyntaxException)
103 { 105 {
104 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 106 m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
105 InitDB(conn); 107 InitDB(conn);
106 } 108 }
107 return true; 109 return true;
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
index 0afc0ce..69dc3f5 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.SQLite
42{ 42{
43 public class SQLiteRegionData : IRegionDataStore 43 public class SQLiteRegionData : IRegionDataStore
44 { 44 {
45 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46
45 private const string primSelect = "select * from prims"; 47 private const string primSelect = "select * from prims";
46 private const string shapeSelect = "select * from primshapes"; 48 private const string shapeSelect = "select * from primshapes";
47 private const string itemsSelect = "select * from primitems"; 49 private const string itemsSelect = "select * from primitems";
@@ -78,7 +80,7 @@ namespace OpenSim.Framework.Data.SQLite
78 80
79 ds = new DataSet(); 81 ds = new DataSet();
80 82
81 MainLog.Instance.Verbose("DATASTORE", "Sqlite - connecting: " + connectionString); 83 m_log.Info("[DATASTORE]: Sqlite - connecting: " + connectionString);
82 m_conn = new SqliteConnection(m_connectionString); 84 m_conn = new SqliteConnection(m_connectionString);
83 m_conn.Open(); 85 m_conn.Open();
84 86
@@ -142,7 +144,7 @@ namespace OpenSim.Framework.Data.SQLite
142 } 144 }
143 catch (Exception) 145 catch (Exception)
144 { 146 {
145 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); 147 m_log.Info("[DATASTORE]: Caught fill error on primshapes table");
146 } 148 }
147 149
148 try 150 try
@@ -151,7 +153,7 @@ namespace OpenSim.Framework.Data.SQLite
151 } 153 }
152 catch (Exception) 154 catch (Exception)
153 { 155 {
154 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on terrain table"); 156 m_log.Info("[DATASTORE]: Caught fill error on terrain table");
155 } 157 }
156 158
157 try 159 try
@@ -160,7 +162,7 @@ namespace OpenSim.Framework.Data.SQLite
160 } 162 }
161 catch (Exception) 163 catch (Exception)
162 { 164 {
163 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on land table"); 165 m_log.Info("[DATASTORE]: Caught fill error on land table");
164 } 166 }
165 167
166 try 168 try
@@ -169,7 +171,7 @@ namespace OpenSim.Framework.Data.SQLite
169 } 171 }
170 catch (Exception) 172 catch (Exception)
171 { 173 {
172 MainLog.Instance.Verbose("DATASTORE", "Caught fill error on landaccesslist table"); 174 m_log.Info("[DATASTORE]: Caught fill error on landaccesslist table");
173 } 175 }
174 return; 176 return;
175 } 177 }
@@ -183,29 +185,29 @@ namespace OpenSim.Framework.Data.SQLite
183 { 185 {
184 if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) 186 if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
185 { 187 {
186 MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); 188 m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
187 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 189 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
188 } 190 }
189 else if (prim.Stopped) 191 else if (prim.Stopped)
190 { 192 {
191 //MainLog.Instance.Verbose("DATASTORE", 193 //m_log.Info("[DATASTORE]: " +
192 //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); 194 //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID);
193 //addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 195 //addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
194 } 196 }
195 else 197 else
196 { 198 {
197 // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); 199 // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID);
198 } 200 }
199 } 201 }
200 } 202 }
201 203
202 Commit(); 204 Commit();
203 // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); 205 // m_log.Info("[Dump of prims]: " + ds.GetXml());
204 } 206 }
205 207
206 public void RemoveObject(LLUUID obj, LLUUID regionUUID) 208 public void RemoveObject(LLUUID obj, LLUUID regionUUID)
207 { 209 {
208 MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); 210 m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID));
209 211
210 DataTable prims = ds.Tables["prims"]; 212 DataTable prims = ds.Tables["prims"];
211 DataTable shapes = ds.Tables["primshapes"]; 213 DataTable shapes = ds.Tables["primshapes"];
@@ -274,7 +276,7 @@ namespace OpenSim.Framework.Data.SQLite
274 lock (ds) 276 lock (ds)
275 { 277 {
276 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); 278 DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
277 MainLog.Instance.Verbose("DATASTORE", 279 m_log.Info("[DATASTORE]: " +
278 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); 280 "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
279 281
280 foreach (DataRow primRow in primsForRegion) 282 foreach (DataRow primRow in primsForRegion)
@@ -296,7 +298,7 @@ namespace OpenSim.Framework.Data.SQLite
296 } 298 }
297 else 299 else
298 { 300 {
299 MainLog.Instance.Notice( 301 m_log.Info(
300 "No shape found for prim in storage, so setting default box shape"); 302 "No shape found for prim in storage, so setting default box shape");
301 prim.Shape = PrimitiveBaseShape.Default; 303 prim.Shape = PrimitiveBaseShape.Default;
302 } 304 }
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.SQLite
316 } 318 }
317 else 319 else
318 { 320 {
319 MainLog.Instance.Notice( 321 m_log.Info(
320 "No shape found for prim in storage, so setting default box shape"); 322 "No shape found for prim in storage, so setting default box shape");
321 prim.Shape = PrimitiveBaseShape.Default; 323 prim.Shape = PrimitiveBaseShape.Default;
322 } 324 }
@@ -330,11 +332,11 @@ namespace OpenSim.Framework.Data.SQLite
330 } 332 }
331 catch (Exception e) 333 catch (Exception e)
332 { 334 {
333 MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); 335 m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows");
334 MainLog.Instance.Verbose("DATASTORE", e.ToString()); 336 m_log.Info("[DATASTORE]: " + e.ToString());
335 foreach (DataColumn col in prims.Columns) 337 foreach (DataColumn col in prims.Columns)
336 { 338 {
337 MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); 339 m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]);
338 } 340 }
339 } 341 }
340 } 342 }
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Data.SQLite
348 /// <param name="prim"></param> 350 /// <param name="prim"></param>
349 private void LoadItems(SceneObjectPart prim) 351 private void LoadItems(SceneObjectPart prim)
350 { 352 {
351 MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID); 353 m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID));
352 354
353 DataTable dbItems = ds.Tables["primitems"]; 355 DataTable dbItems = ds.Tables["primitems"];
354 356
@@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.SQLite
362 TaskInventoryItem item = buildItem(row); 364 TaskInventoryItem item = buildItem(row);
363 inventory.Add(item); 365 inventory.Add(item);
364 366
365 MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID); 367 m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID));
366 } 368 }
367 369
368 prim.RestoreInventoryItems(inventory); 370 prim.RestoreInventoryItems(inventory);
@@ -383,7 +385,7 @@ namespace OpenSim.Framework.Data.SQLite
383 385
384 // the following is an work around for .NET. The perf 386 // the following is an work around for .NET. The perf
385 // issues associated with it aren't as bad as you think. 387 // issues associated with it aren't as bad as you think.
386 MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); 388 m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString());
387 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + 389 String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" +
388 " values(:RegionUUID, :Revision, :Heightfield)"; 390 " values(:RegionUUID, :Revision, :Heightfield)";
389 391
@@ -446,11 +448,11 @@ namespace OpenSim.Framework.Data.SQLite
446 } 448 }
447 else 449 else
448 { 450 {
449 MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); 451 m_log.Info("[DATASTORE]: No terrain found for region");
450 return null; 452 return null;
451 } 453 }
452 454
453 MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); 455 m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString());
454 } 456 }
455 } 457 }
456 return terret; 458 return terret;
@@ -1265,7 +1267,7 @@ namespace OpenSim.Framework.Data.SQLite
1265 if (!persistPrimInventories) 1267 if (!persistPrimInventories)
1266 return; 1268 return;
1267 1269
1268 MainLog.Instance.Verbose("DATASTORE", "Entered StorePrimInventory with prim ID {0}", primID); 1270 m_log.Info(String.Format("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID));
1269 1271
1270 DataTable dbItems = ds.Tables["primitems"]; 1272 DataTable dbItems = ds.Tables["primitems"];
1271 1273
@@ -1278,10 +1280,10 @@ namespace OpenSim.Framework.Data.SQLite
1278 // repalce with current inventory details 1280 // repalce with current inventory details
1279 foreach (TaskInventoryItem newItem in items) 1281 foreach (TaskInventoryItem newItem in items)
1280 { 1282 {
1281// MainLog.Instance.Verbose( 1283// m_log.Info(String.Format(
1282// "DATASTORE", 1284// "[DATASTORE]: ",
1283// "Adding item {0}, {1} to prim ID {2}", 1285// "Adding item {0}, {1} to prim ID {2}",
1284// newItem.Name, newItem.ItemID, newItem.ParentPartID); 1286// newItem.Name, newItem.ItemID, newItem.ParentPartID));
1285 1287
1286 DataRow newItemRow = dbItems.NewRow(); 1288 DataRow newItemRow = dbItems.NewRow();
1287 fillItemRow(newItemRow, newItem); 1289 fillItemRow(newItemRow, newItem);
@@ -1508,7 +1510,7 @@ namespace OpenSim.Framework.Data.SQLite
1508 } 1510 }
1509 catch (SqliteSyntaxException) 1511 catch (SqliteSyntaxException)
1510 { 1512 {
1511 MainLog.Instance.Warn("SQLITE", "Primitives Table Already Exists"); 1513 m_log.Warn("[SQLITE]: Primitives Table Already Exists");
1512 } 1514 }
1513 1515
1514 try 1516 try
@@ -1517,7 +1519,7 @@ namespace OpenSim.Framework.Data.SQLite
1517 } 1519 }
1518 catch (SqliteSyntaxException) 1520 catch (SqliteSyntaxException)
1519 { 1521 {
1520 MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists"); 1522 m_log.Warn("[SQLITE]: Shapes Table Already Exists");
1521 } 1523 }
1522 1524
1523 if (persistPrimInventories) 1525 if (persistPrimInventories)
@@ -1528,7 +1530,7 @@ namespace OpenSim.Framework.Data.SQLite
1528 } 1530 }
1529 catch (SqliteSyntaxException) 1531 catch (SqliteSyntaxException)
1530 { 1532 {
1531 MainLog.Instance.Warn("SQLITE", "Primitives Inventory Table Already Exists"); 1533 m_log.Warn("[SQLITE]: Primitives Inventory Table Already Exists");
1532 } 1534 }
1533 } 1535 }
1534 1536
@@ -1538,7 +1540,7 @@ namespace OpenSim.Framework.Data.SQLite
1538 } 1540 }
1539 catch (SqliteSyntaxException) 1541 catch (SqliteSyntaxException)
1540 { 1542 {
1541 MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists"); 1543 m_log.Warn("[SQLITE]: Terrain Table Already Exists");
1542 } 1544 }
1543 1545
1544 try 1546 try
@@ -1547,7 +1549,7 @@ namespace OpenSim.Framework.Data.SQLite
1547 } 1549 }
1548 catch (SqliteSyntaxException) 1550 catch (SqliteSyntaxException)
1549 { 1551 {
1550 MainLog.Instance.Warn("SQLITE", "Land Table Already Exists"); 1552 m_log.Warn("[SQLITE]: Land Table Already Exists");
1551 } 1553 }
1552 1554
1553 try 1555 try
@@ -1556,7 +1558,7 @@ namespace OpenSim.Framework.Data.SQLite
1556 } 1558 }
1557 catch (SqliteSyntaxException) 1559 catch (SqliteSyntaxException)
1558 { 1560 {
1559 MainLog.Instance.Warn("SQLITE", "LandAccessList Table Already Exists"); 1561 m_log.Warn("[SQLITE]: LandAccessList Table Already Exists");
1560 } 1562 }
1561 conn.Close(); 1563 conn.Close();
1562 } 1564 }
@@ -1596,7 +1598,7 @@ namespace OpenSim.Framework.Data.SQLite
1596 } 1598 }
1597 catch (SqliteSyntaxException) 1599 catch (SqliteSyntaxException)
1598 { 1600 {
1599 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 1601 m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
1600 InitDB(conn); 1602 InitDB(conn);
1601 } 1603 }
1602 1604
@@ -1614,7 +1616,7 @@ namespace OpenSim.Framework.Data.SQLite
1614 { 1616 {
1615 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) 1617 if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
1616 { 1618 {
1617 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 1619 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
1618 return false; 1620 return false;
1619 } 1621 }
1620 } 1622 }
@@ -1623,7 +1625,7 @@ namespace OpenSim.Framework.Data.SQLite
1623 { 1625 {
1624 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) 1626 if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
1625 { 1627 {
1626 MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); 1628 m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName);
1627 return false; 1629 return false;
1628 } 1630 }
1629 } 1631 }
@@ -1634,7 +1636,7 @@ namespace OpenSim.Framework.Data.SQLite
1634 { 1636 {
1635 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) 1637 if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
1636 { 1638 {
1637 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1639 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1638 return false; 1640 return false;
1639 } 1641 }
1640 } 1642 }
@@ -1643,7 +1645,7 @@ namespace OpenSim.Framework.Data.SQLite
1643 { 1645 {
1644 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) 1646 if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
1645 { 1647 {
1646 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1648 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1647 return false; 1649 return false;
1648 } 1650 }
1649 } 1651 }
@@ -1652,7 +1654,7 @@ namespace OpenSim.Framework.Data.SQLite
1652 { 1654 {
1653 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) 1655 if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
1654 { 1656 {
1655 MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); 1657 m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
1656 return false; 1658 return false;
1657 } 1659 }
1658 } 1660 }
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index ac7340d..2316de8 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite
39 /// </summary> 39 /// </summary>
40 public class SQLiteUserData : SQLiteBase, IUserData 40 public class SQLiteUserData : SQLiteBase, IUserData
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43
42 /// <summary> 44 /// <summary>
43 /// The database manager 45 /// The database manager
44 /// </summary> 46 /// </summary>
@@ -89,7 +91,7 @@ namespace OpenSim.Framework.Data.SQLite
89 } 91 }
90 catch (SqliteSyntaxException) 92 catch (SqliteSyntaxException)
91 { 93 {
92 MainLog.Instance.Verbose("SQLITE", "userfriends table not found, creating.... "); 94 m_log.Info("[SQLITE]: userfriends table not found, creating.... ");
93 InitDB(conn); 95 InitDB(conn);
94 daf.Fill(ds.Tables["userfriends"]); 96 daf.Fill(ds.Tables["userfriends"]);
95 } 97 }
@@ -217,7 +219,7 @@ namespace OpenSim.Framework.Data.SQLite
217 } 219 }
218 catch (Exception ex) 220 catch (Exception ex)
219 { 221 {
220 MainLog.Instance.Error("USER", "Exception getting friends list for user: " + ex.ToString()); 222 m_log.Error("[USER]: Exception getting friends list for user: " + ex.ToString());
221 } 223 }
222 } 224 }
223 225
@@ -231,7 +233,7 @@ namespace OpenSim.Framework.Data.SQLite
231 233
232 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) 234 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
233 { 235 {
234 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 236 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
235 } 237 }
236 238
237 239
@@ -339,7 +341,7 @@ namespace OpenSim.Framework.Data.SQLite
339 DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID)); 341 DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID));
340 if (row == null) 342 if (row == null)
341 { 343 {
342 MainLog.Instance.Warn("WEBLOGIN", "Unable to store new web login key for non-existant user"); 344 m_log.Warn("[WEBLOGIN]: Unable to store new web login key for non-existant user");
343 } 345 }
344 else 346 else
345 { 347 {
@@ -411,7 +413,7 @@ namespace OpenSim.Framework.Data.SQLite
411 } 413 }
412 } 414 }
413 415
414 MainLog.Instance.Verbose("SQLITE", 416 m_log.Info("[SQLITE]: " +
415 "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); 417 "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
416 // save changes off to disk 418 // save changes off to disk
417 da.Update(ds, "users"); 419 da.Update(ds, "users");
@@ -775,7 +777,7 @@ namespace OpenSim.Framework.Data.SQLite
775 } 777 }
776 catch (System.Exception) 778 catch (System.Exception)
777 { 779 {
778 MainLog.Instance.Verbose("USERS", "users table already exists"); 780 m_log.Info("[USERS]: users table already exists");
779 } 781 }
780 782
781 try 783 try
@@ -784,7 +786,7 @@ namespace OpenSim.Framework.Data.SQLite
784 } 786 }
785 catch (System.Exception) 787 catch (System.Exception)
786 { 788 {
787 MainLog.Instance.Verbose("USERS", "userfriends table already exists"); 789 m_log.Info("[USERS]: userfriends table already exists");
788 } 790 }
789 791
790 conn.Close(); 792 conn.Close();
@@ -807,7 +809,7 @@ namespace OpenSim.Framework.Data.SQLite
807 } 809 }
808 catch (SqliteSyntaxException) 810 catch (SqliteSyntaxException)
809 { 811 {
810 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 812 m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
811 InitDB(conn); 813 InitDB(conn);
812 } 814 }
813 conn.Open(); 815 conn.Open();
diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
index 57cf4cf..4ef500c 100644
--- a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
@@ -63,4 +63,4 @@ using System.Runtime.InteropServices;
63// by using the '*' as shown below: 63// by using the '*' as shown below:
64 64
65[assembly : AssemblyVersion("1.0.0.0")] 65[assembly : AssemblyVersion("1.0.0.0")]
66[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file 66[assembly : AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index b5a3468..26924eb 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -28,11 +28,14 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework.Console;
31 32
32namespace OpenSim.Framework 33namespace OpenSim.Framework
33{ 34{
34 public class EstateSettings 35 public class EstateSettings
35 { 36 {
37 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
38
36 //Settings to this island 39 //Settings to this island
37 private float m_billableFactor; 40 private float m_billableFactor;
38 41
@@ -734,7 +737,7 @@ namespace OpenSim.Framework
734 } 737 }
735 else 738 else
736 { 739 {
737 OpenSim.Framework.Console.MainLog.Instance.Error("ESTATESETTINGS", "Unable to locate estate manager : " + avatarID.ToString() + " for removal"); 740 m_log.Error("[ESTATESETTINGS]: Unable to locate estate manager : " + avatarID.ToString() + " for removal");
738 } 741 }
739 } 742 }
740 743
@@ -749,7 +752,7 @@ namespace OpenSim.Framework
749 { 752 {
750 configMember = 753 configMember =
751 new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", 754 new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS",
752 loadConfigurationOptions, handleIncomingConfiguration,true); 755 loadConfigurationOptions, handleIncomingConfiguration, true);
753 configMember.performConfigurationRetrieve(); 756 configMember.performConfigurationRetrieve();
754 } 757 }
755 } 758 }
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs
index 61a53d7..0723756 100644
--- a/OpenSim/Framework/GridConfig.cs
+++ b/OpenSim/Framework/GridConfig.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28 28
29using System; 29using System;
30using OpenSim.Framework.Console;
30 31
31namespace OpenSim.Framework 32namespace OpenSim.Framework
32{ 33{
diff --git a/OpenSim/Framework/InventoryConfig.cs b/OpenSim/Framework/InventoryConfig.cs
index 108e7ff..0c13df5 100644
--- a/OpenSim/Framework/InventoryConfig.cs
+++ b/OpenSim/Framework/InventoryConfig.cs
@@ -26,6 +26,8 @@
26* 26*
27*/ 27*/
28 28
29using OpenSim.Framework.Console;
30
29namespace OpenSim.Framework 31namespace OpenSim.Framework
30{ 32{
31 /// <summary> 33 /// <summary>
diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs
index ccb6e7a..c7fee85 100644
--- a/OpenSim/Framework/MessageServerConfig.cs
+++ b/OpenSim/Framework/MessageServerConfig.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Framework.Console;
31 32
32namespace OpenSim.Framework 33namespace OpenSim.Framework
33{ 34{
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 751ca9d..e953182 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -31,6 +31,7 @@ using System.Net.Sockets;
31using System.Xml; 31using System.Xml;
32using libsecondlife; 32using libsecondlife;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework.Console;
34 35
35namespace OpenSim.Framework 36namespace OpenSim.Framework
36{ 37{
@@ -176,7 +177,7 @@ namespace OpenSim.Framework
176 public string MasterAvatarSandboxPassword = String.Empty; 177 public string MasterAvatarSandboxPassword = String.Empty;
177 178
178 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 179 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
179 private static EstateSettings m_estateSettings; 180 private EstateSettings m_estateSettings;
180 181
181 public EstateSettings EstateSettings 182 public EstateSettings EstateSettings
182 { 183 {
@@ -196,7 +197,7 @@ namespace OpenSim.Framework
196 public RegionInfo(string description, string filename, bool skipConsoleConfig) 197 public RegionInfo(string description, string filename, bool skipConsoleConfig)
197 { 198 {
198 configMember = 199 configMember =
199 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration,!skipConsoleConfig); 200 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
200 configMember.performConfigurationRetrieve(); 201 configMember.performConfigurationRetrieve();
201 } 202 }
202 203
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
index 8a1a038..76d0b34 100644
--- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
+++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.RegionLoader.Web
35{ 35{
36 public class RegionLoaderWebServer : IRegionLoader 36 public class RegionLoaderWebServer : IRegionLoader
37 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
38 private IniConfigSource m_configSouce; 40 private IniConfigSource m_configSouce;
39 41
40 public void SetIniConfigSource(IniConfigSource configSource) 42 public void SetIniConfigSource(IniConfigSource configSource)
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.RegionLoader.Web
46 { 48 {
47 if (m_configSouce == null) 49 if (m_configSouce == null)
48 { 50 {
49 MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!"); 51 m_log.Error("[WEBLOADER]: Unable to load configuration source!");
50 return null; 52 return null;
51 } 53 }
52 else 54 else
@@ -55,16 +57,16 @@ namespace OpenSim.Framework.RegionLoader.Web
55 string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim(); 57 string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim();
56 if (url == System.String.Empty) 58 if (url == System.String.Empty)
57 { 59 {
58 MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty."); 60 m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty.");
59 return null; 61 return null;
60 } 62 }
61 else 63 else
62 { 64 {
63 HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); 65 HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url);
64 webRequest.Timeout = 30000; //30 Second Timeout 66 webRequest.Timeout = 30000; //30 Second Timeout
65 MainLog.Instance.Debug("WEBLOADER", "Sending Download Request..."); 67 m_log.Debug("[WEBLOADER]: Sending Download Request...");
66 HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); 68 HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
67 MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server..."); 69 m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server...");
68 StreamReader reader = new StreamReader(webResponse.GetResponseStream()); 70 StreamReader reader = new StreamReader(webResponse.GetResponseStream());
69 string xmlSource = System.String.Empty; 71 string xmlSource = System.String.Empty;
70 string tempStr = reader.ReadLine(); 72 string tempStr = reader.ReadLine();
@@ -73,9 +75,8 @@ namespace OpenSim.Framework.RegionLoader.Web
73 xmlSource = xmlSource + tempStr; 75 xmlSource = xmlSource + tempStr;
74 tempStr = reader.ReadLine(); 76 tempStr = reader.ReadLine();
75 } 77 }
76 MainLog.Instance.Debug("WEBLOADER", 78 m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
77 "Done downloading region information from server. Total Bytes: " + 79 xmlSource.Length);
78 xmlSource.Length);
79 XmlDocument xmlDoc = new XmlDocument(); 80 XmlDocument xmlDoc = new XmlDocument();
80 xmlDoc.LoadXml(xmlSource); 81 xmlDoc.LoadXml(xmlSource);
81 if (xmlDoc.FirstChild.Name == "Regions") 82 if (xmlDoc.FirstChild.Name == "Regions")
@@ -84,7 +85,7 @@ namespace OpenSim.Framework.RegionLoader.Web
84 int i; 85 int i;
85 for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) 86 for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++)
86 { 87 {
87 MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); 88 m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
88 regionInfos[i] = 89 regionInfos[i] =
89 new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); 90 new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false);
90 } 91 }
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index df3b049..cc0c0d0 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -41,6 +41,8 @@ namespace OpenSim.Framework.Servers
41{ 41{
42 public class BaseHttpServer 42 public class BaseHttpServer
43 { 43 {
44 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
45
44 protected Thread m_workerThread; 46 protected Thread m_workerThread;
45 protected HttpListener m_httpListener; 47 protected HttpListener m_httpListener;
46 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 48 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
@@ -296,7 +298,7 @@ namespace OpenSim.Framework.Servers
296 } 298 }
297 catch (Exception ex) 299 catch (Exception ex)
298 { 300 {
299 MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); 301 m_log.Warn("[HTTPD]: Error - " + ex.Message);
300 } 302 }
301 finally 303 finally
302 { 304 {
@@ -319,7 +321,7 @@ namespace OpenSim.Framework.Servers
319 LLSD llsdResponse = null; 321 LLSD llsdResponse = null;
320 322
321 try { llsdRequest = LLSDParser.DeserializeXml(requestBody); } 323 try { llsdRequest = LLSDParser.DeserializeXml(requestBody); }
322 catch (Exception ex) { MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); } 324 catch (Exception ex) { m_log.Warn("[HTTPD]: Error - " + ex.Message); }
323 325
324 if (llsdRequest != null && m_llsdHandler != null) 326 if (llsdRequest != null && m_llsdHandler != null)
325 { 327 {
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Servers
348 } 350 }
349 catch (Exception ex) 351 catch (Exception ex)
350 { 352 {
351 MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); 353 m_log.Warn("[HTTPD]: Error - " + ex.Message);
352 } 354 }
353 finally 355 finally
354 { 356 {
@@ -396,7 +398,7 @@ namespace OpenSim.Framework.Servers
396 398
397 foreach (string headername in rHeaders) 399 foreach (string headername in rHeaders)
398 { 400 {
399 //MainLog.Instance.Warn("HEADER", headername + "=" + request.Headers[headername]); 401 //m_log.Warn("[HEADER]: " + headername + "=" + request.Headers[headername]);
400 headervals[headername] = request.Headers[headername]; 402 headervals[headername] = request.Headers[headername];
401 } 403 }
402 404
@@ -407,9 +409,9 @@ namespace OpenSim.Framework.Servers
407 409
408 if (keysvals.Contains("method")) 410 if (keysvals.Contains("method"))
409 { 411 {
410 //MainLog.Instance.Warn("HTTP", "Contains Method"); 412 //m_log.Warn("[HTTP]: Contains Method");
411 string method = (string) keysvals["method"]; 413 string method = (string) keysvals["method"];
412 //MainLog.Instance.Warn("HTTP", requestBody); 414 //m_log.Warn("[HTTP]: " + requestBody);
413 GenericHTTPMethod requestprocessor; 415 GenericHTTPMethod requestprocessor;
414 bool foundHandler = TryGetHTTPHandler(method, out requestprocessor); 416 bool foundHandler = TryGetHTTPHandler(method, out requestprocessor);
415 if (foundHandler) 417 if (foundHandler)
@@ -422,13 +424,13 @@ namespace OpenSim.Framework.Servers
422 } 424 }
423 else 425 else
424 { 426 {
425 //MainLog.Instance.Warn("HTTP", "Handler Not Found"); 427 //m_log.Warn("[HTTP]: Handler Not Found");
426 SendHTML404(response, host); 428 SendHTML404(response, host);
427 } 429 }
428 } 430 }
429 else 431 else
430 { 432 {
431 //MainLog.Instance.Warn("HTTP", "No Method specified"); 433 //m_log.Warn("[HTTP]: No Method specified");
432 SendHTML404(response, host); 434 SendHTML404(response, host);
433 } 435 }
434 } 436 }
@@ -461,7 +463,7 @@ namespace OpenSim.Framework.Servers
461 } 463 }
462 catch (Exception ex) 464 catch (Exception ex)
463 { 465 {
464 MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); 466 m_log.Warn("[HTTPD]: Error - " + ex.Message);
465 } 467 }
466 finally 468 finally
467 { 469 {
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Servers
488 } 490 }
489 catch (Exception ex) 491 catch (Exception ex)
490 { 492 {
491 MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); 493 m_log.Warn("[HTTPD]: Error - " + ex.Message);
492 } 494 }
493 finally 495 finally
494 { 496 {
@@ -513,7 +515,7 @@ namespace OpenSim.Framework.Servers
513 } 515 }
514 catch (Exception ex) 516 catch (Exception ex)
515 { 517 {
516 MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); 518 m_log.Warn("[HTTPD]: Error - " + ex.Message);
517 } 519 }
518 finally 520 finally
519 { 521 {
@@ -523,7 +525,7 @@ namespace OpenSim.Framework.Servers
523 525
524 public void Start() 526 public void Start()
525 { 527 {
526 MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server"); 528 m_log.Info("[HTTPD]: Starting up HTTP Server");
527 529
528 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 530 m_workerThread = new Thread(new ThreadStart(StartHTTP));
529 m_workerThread.IsBackground = true; 531 m_workerThread.IsBackground = true;
@@ -534,7 +536,7 @@ namespace OpenSim.Framework.Servers
534 { 536 {
535 try 537 try
536 { 538 {
537 MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK"); 539 m_log.Info("[HTTPD]: Spawned main thread OK");
538 m_httpListener = new HttpListener(); 540 m_httpListener = new HttpListener();
539 541
540 if (!m_ssl) 542 if (!m_ssl)
@@ -556,7 +558,7 @@ namespace OpenSim.Framework.Servers
556 } 558 }
557 catch (Exception e) 559 catch (Exception e)
558 { 560 {
559 MainLog.Instance.Warn("HTTPD", "Error - " + e.Message); 561 m_log.Warn("[HTTPD]: Error - " + e.Message);
560 } 562 }
561 } 563 }
562 564
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 3016715..4831446 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -1,4 +1,4 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
@@ -27,7 +27,6 @@
27*/ 27*/
28 28
29using System; 29using System;
30
31using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
32 31
33namespace OpenSim.Framework.Servers 32namespace OpenSim.Framework.Servers
@@ -37,8 +36,7 @@ namespace OpenSim.Framework.Servers
37 /// </summary> 36 /// </summary>
38 public abstract class BaseOpenSimServer 37 public abstract class BaseOpenSimServer
39 { 38 {
40 protected LogBase m_log; 39 protected ConsoleBase m_console;
41
42 protected DateTime m_startuptime; 40 protected DateTime m_startuptime;
43 41
44 public BaseOpenSimServer() 42 public BaseOpenSimServer()
@@ -56,7 +54,7 @@ namespace OpenSim.Framework.Servers
56 switch (command) 54 switch (command)
57 { 55 {
58 case "help": 56 case "help":
59 m_log.Notice("show uptime - show server startup and uptime."); 57 m_console.Notice("show uptime - show server startup and uptime.");
60 break; 58 break;
61 59
62 case "show": 60 case "show":
@@ -77,8 +75,8 @@ namespace OpenSim.Framework.Servers
77 switch (ShowWhat) 75 switch (ShowWhat)
78 { 76 {
79 case "uptime": 77 case "uptime":
80 m_log.Notice("Server has been running since " + m_startuptime.ToString()); 78 m_console.Notice("Server has been running since " + m_startuptime.ToString());
81 m_log.Notice("That is " + (DateTime.Now - m_startuptime).ToString()); 79 m_console.Notice("That is " + (DateTime.Now - m_startuptime).ToString());
82 break; 80 break;
83 } 81 }
84 } 82 }
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
index 47b3f24..6599d86 100644
--- a/OpenSim/Framework/Servers/CheckSumServer.cs
+++ b/OpenSim/Framework/Servers/CheckSumServer.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Framework.Servers
31 /* 31 /*
32 public class CheckSumServer : UDPServerBase 32 public class CheckSumServer : UDPServerBase
33 { 33 {
34 //protected ConsoleBase m_log; 34 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
35 35
36 public CheckSumServer(int port) 36 public CheckSumServer(int port)
37 : base(port) 37 : base(port)
@@ -114,7 +114,7 @@ namespace OpenSim.Framework.Servers
114 } 114 }
115 catch (Exception) 115 catch (Exception)
116 { 116 {
117 MainLog.Instance.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection "); 117 m_log.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
118 } 118 }
119 } 119 }
120 120
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs
index a4b8a5d..3a2f384 100644
--- a/OpenSim/Framework/UserConfig.cs
+++ b/OpenSim/Framework/UserConfig.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28 28
29using System; 29using System;
30using OpenSim.Framework.Console;
30 31
31namespace OpenSim.Framework 32namespace OpenSim.Framework
32{ 33{