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/Local/LocalBackEndServices.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/Local/LocalBackEndServices.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalBackEndServices.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 25452c1..98419ab 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Communications.Local | |||
36 | { | 36 | { |
37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications | 37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); | 41 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); |
40 | 42 | ||
41 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = | 43 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = |
@@ -93,8 +95,9 @@ namespace OpenSim.Region.Communications.Local | |||
93 | RegionCommsListener regionHost = new RegionCommsListener(); | 95 | RegionCommsListener regionHost = new RegionCommsListener(); |
94 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 96 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
95 | { | 97 | { |
96 | MainLog.Instance.Error("INTERREGION", | 98 | m_log.Error("[INTERREGION]: " + |
97 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | 99 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. " + |
100 | "In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | ||
98 | m_regionListeners.Remove(regionInfo.RegionHandle); | 101 | m_regionListeners.Remove(regionInfo.RegionHandle); |
99 | } | 102 | } |
100 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); | 103 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); |
@@ -105,7 +108,7 @@ namespace OpenSim.Region.Communications.Local | |||
105 | { | 108 | { |
106 | // Already in our list, so the region went dead and restarted. | 109 | // Already in our list, so the region went dead and restarted. |
107 | m_regions.Remove(regionInfo.RegionHandle); | 110 | m_regions.Remove(regionInfo.RegionHandle); |
108 | MainLog.Instance.Warn("INTERREGION", "Region registered twice. Region went down and came back up."); | 111 | m_log.Warn("[INTERREGION]: Region registered twice. Region went down and came back up."); |
109 | 112 | ||
110 | RegionCommsListener regionHost = new RegionCommsListener(); | 113 | RegionCommsListener regionHost = new RegionCommsListener(); |
111 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 114 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
@@ -229,7 +232,7 @@ namespace OpenSim.Region.Communications.Local | |||
229 | { | 232 | { |
230 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 233 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
231 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); | 234 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); |
232 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 235 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
233 | 236 | ||
234 | return true; | 237 | return true; |
235 | } | 238 | } |
@@ -292,13 +295,13 @@ namespace OpenSim.Region.Communications.Local | |||
292 | //should change from agentCircuitData | 295 | //should change from agentCircuitData |
293 | { | 296 | { |
294 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 297 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
295 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); | 298 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); |
296 | 299 | ||
297 | if (m_regionListeners.ContainsKey(regionHandle)) | 300 | if (m_regionListeners.ContainsKey(regionHandle)) |
298 | { | 301 | { |
299 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 302 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
300 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); | 303 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); |
301 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 304 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
302 | 305 | ||
303 | return true; | 306 | return true; |
304 | } | 307 | } |
@@ -389,11 +392,11 @@ namespace OpenSim.Region.Communications.Local | |||
389 | 392 | ||
390 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) | 393 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) |
391 | { | 394 | { |
392 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); | 395 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); |
393 | 396 | ||
394 | if (m_regionListeners.ContainsKey(regionHandle)) | 397 | if (m_regionListeners.ContainsKey(regionHandle)) |
395 | { | 398 | { |
396 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); | 399 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); |
397 | 400 | ||
398 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); | 401 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); |
399 | } | 402 | } |
@@ -443,11 +446,11 @@ namespace OpenSim.Region.Communications.Local | |||
443 | 446 | ||
444 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 447 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
445 | { | 448 | { |
446 | // MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); | 449 | // m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); |
447 | 450 | ||
448 | if (m_regionListeners.ContainsKey(regionHandle)) | 451 | if (m_regionListeners.ContainsKey(regionHandle)) |
449 | { | 452 | { |
450 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); | 453 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); |
451 | 454 | ||
452 | TriggerExpectUser(regionHandle, agentData); | 455 | TriggerExpectUser(regionHandle, agentData); |
453 | return true; | 456 | return true; |