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/LibraryRootFolder.cs | |
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 'OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | 38 |
1 files changed, 20 insertions, 18 deletions
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 | ||