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/Region/Communications/OGS1/OGS1InventoryService.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/Region/Communications/OGS1/OGS1InventoryService.cs')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 1780707..656dd70 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
38 | { | 38 | { |
39 | public class OGS1InventoryService : IInventoryServices | 39 | public class OGS1InventoryService : IInventoryServices |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private string _inventoryServerUrl; | 43 | private string _inventoryServerUrl; |
42 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); | 44 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); |
43 | 45 | ||
@@ -71,9 +73,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
71 | { | 73 | { |
72 | try | 74 | try |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose( | 76 | m_log.Info( |
75 | "INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}", | 77 | String.Format("[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}", |
76 | _inventoryServerUrl, userID); | 78 | _inventoryServerUrl, userID)); |
77 | 79 | ||
78 | RestObjectPosterResponse<InventoryCollection> requester | 80 | RestObjectPosterResponse<InventoryCollection> requester |
79 | = new RestObjectPosterResponse<InventoryCollection>(); | 81 | = new RestObjectPosterResponse<InventoryCollection>(); |
@@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
83 | } | 85 | } |
84 | catch (Exception e) | 86 | catch (Exception e) |
85 | { | 87 | { |
86 | MainLog.Instance.Error("INVENTORY", e.ToString()); | 88 | m_log.Error("[INVENTORY]: " + e.ToString()); |
87 | } | 89 | } |
88 | } | 90 | } |
89 | 91 | ||
@@ -96,9 +98,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
96 | LLUUID userID = response.UserID; | 98 | LLUUID userID = response.UserID; |
97 | if (m_RequestingInventory.ContainsKey(userID)) | 99 | if (m_RequestingInventory.ContainsKey(userID)) |
98 | { | 100 | { |
99 | MainLog.Instance.Verbose("INVENTORY", | 101 | m_log.Info(String.Format("[INVENTORY]: " + |
100 | "Received inventory response for user {0} containing {1} folders and {2} items", | 102 | "Received inventory response for user {0} containing {1} folders and {2} items", |
101 | userID, response.Folders.Count, response.AllItems.Count); | 103 | userID, response.Folders.Count, response.AllItems.Count)); |
102 | 104 | ||
103 | InventoryFolderImpl rootFolder = null; | 105 | InventoryFolderImpl rootFolder = null; |
104 | InventoryRequest request = m_RequestingInventory[userID]; | 106 | InventoryRequest request = m_RequestingInventory[userID]; |
@@ -132,10 +134,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
132 | } | 134 | } |
133 | else | 135 | else |
134 | { | 136 | { |
135 | MainLog.Instance.Warn( | 137 | m_log.Warn( |
136 | "INVENTORY", | 138 | String.Format("[INVENTORY]: " + |
137 | "Received inventory response for {0} for which we do not have a record of requesting!", | 139 | "Received inventory response for {0} for which we do not have a record of requesting!", |
138 | userID); | 140 | userID)); |
139 | } | 141 | } |
140 | } | 142 | } |
141 | 143 | ||
@@ -198,4 +200,4 @@ namespace OpenSim.Region.Communications.OGS1 | |||
198 | } | 200 | } |
199 | } | 201 | } |
200 | } | 202 | } |
201 | } \ No newline at end of file | 203 | } |