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/Grid/InventoryServer/InventoryManager.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Grid/InventoryServer/InventoryManager.cs')
-rw-r--r-- | OpenSim/Grid/InventoryServer/InventoryManager.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 6ca5064..35b66b2 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Grid.InventoryServer | |||
41 | { | 41 | { |
42 | public class InventoryManager | 42 | public class InventoryManager |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private IInventoryData _databasePlugin; | 46 | private IInventoryData _databasePlugin; |
45 | 47 | ||
46 | /// <summary> | 48 | /// <summary> |
@@ -49,10 +51,10 @@ namespace OpenSim.Grid.InventoryServer | |||
49 | /// <param name="FileName">The filename to the inventory server plugin DLL</param> | 51 | /// <param name="FileName">The filename to the inventory server plugin DLL</param> |
50 | public void AddDatabasePlugin(string FileName) | 52 | public void AddDatabasePlugin(string FileName) |
51 | { | 53 | { |
52 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName); | 54 | m_log.Info("[" + OpenInventory_Main.LogName + "]: Invenstorage: Attempting to load " + FileName); |
53 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
54 | 56 | ||
55 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, | 57 | m_log.Info("[" + OpenInventory_Main.LogName + "]: " + |
56 | "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 58 | "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
57 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 59 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
58 | { | 60 | { |
@@ -66,7 +68,7 @@ namespace OpenSim.Grid.InventoryServer | |||
66 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 68 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
67 | plug.Initialise(); | 69 | plug.Initialise(); |
68 | _databasePlugin = plug; | 70 | _databasePlugin = plug; |
69 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, | 71 | m_log.Info("[" + OpenInventory_Main.LogName + "]: " + |
70 | "Invenstorage: Added IInventoryData Interface"); | 72 | "Invenstorage: Added IInventoryData Interface"); |
71 | break; | 73 | break; |
72 | } | 74 | } |
@@ -156,7 +158,7 @@ namespace OpenSim.Grid.InventoryServer | |||
156 | saveInventoryToStream(_inventory, fs); | 158 | saveInventoryToStream(_inventory, fs); |
157 | fs.Flush(); | 159 | fs.Flush(); |
158 | fs.Close(); | 160 | fs.Close(); |
159 | MainLog.Instance.Debug(OpenInventory_Main.LogName, "Modified"); | 161 | m_log.Debug("[" + OpenInventory_Main.LogName + "]: Modified"); |
160 | } | 162 | } |
161 | } | 163 | } |
162 | 164 | ||
@@ -166,14 +168,14 @@ namespace OpenSim.Grid.InventoryServer | |||
166 | 168 | ||
167 | private byte[] GetUserInventory(LLUUID userID) | 169 | private byte[] GetUserInventory(LLUUID userID) |
168 | { | 170 | { |
169 | MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString()); | 171 | m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Getting Inventory for user {0}", userID.ToString())); |
170 | byte[] result = new byte[] {}; | 172 | byte[] result = new byte[] {}; |
171 | 173 | ||
172 | InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); | 174 | InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); |
173 | if (fb == null) | 175 | if (fb == null) |
174 | { | 176 | { |
175 | MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", | 177 | m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Inventory not found for user {0}, creating new", |
176 | userID.ToString()); | 178 | userID.ToString())); |
177 | CreateDefaultInventory(userID); | 179 | CreateDefaultInventory(userID); |
178 | } | 180 | } |
179 | 181 | ||