diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/Communications/Cache | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to '')
7 files changed, 77 insertions, 65 deletions
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 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.IO; | 31 | using System.IO; |
31 | using System.Xml; | 32 | using System.Xml; |
32 | using libsecondlife; | 33 | using libsecondlife; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | |||
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | 36 | ||
37 | namespace OpenSim.Framework.Communications.Cache | 37 | namespace 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 | |||
29 | using System; | ||
28 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
29 | using libsecondlife; | 31 | using libsecondlife; |
30 | using OpenSim.Framework.Console; | 32 | using 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) |