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/MessagingServer/MessageService.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 '')
-rw-r--r-- | OpenSim/Grid/MessagingServer/MessageService.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 056bfcb..c2669b0 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -43,7 +43,8 @@ namespace OpenSim.Grid.MessagingServer | |||
43 | { | 43 | { |
44 | public class MessageService | 44 | public class MessageService |
45 | { | 45 | { |
46 | private LogBase m_log; | 46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
47 | |||
47 | private MessageServerConfig m_cfg; | 48 | private MessageServerConfig m_cfg; |
48 | 49 | ||
49 | //A hashtable of all current presences this server knows about | 50 | //A hashtable of all current presences this server knows about |
@@ -58,13 +59,10 @@ namespace OpenSim.Grid.MessagingServer | |||
58 | // Hashtable containing work units that need to be processed | 59 | // Hashtable containing work units that need to be processed |
59 | private Hashtable m_unProcessedWorkUnits = new Hashtable(); | 60 | private Hashtable m_unProcessedWorkUnits = new Hashtable(); |
60 | 61 | ||
61 | 62 | public MessageService(MessageServerConfig cfg) | |
62 | public MessageService(LogBase log, MessageServerConfig cfg) | ||
63 | { | 63 | { |
64 | m_log = log; | ||
65 | m_cfg = cfg; | 64 | m_cfg = cfg; |
66 | } | 65 | } |
67 | |||
68 | 66 | ||
69 | #region RegionComms Methods | 67 | #region RegionComms Methods |
70 | 68 | ||
@@ -84,7 +82,7 @@ namespace OpenSim.Grid.MessagingServer | |||
84 | ArrayList SendParams = new ArrayList(); | 82 | ArrayList SendParams = new ArrayList(); |
85 | SendParams.Add(PresenceParams); | 83 | SendParams.Add(PresenceParams); |
86 | 84 | ||
87 | MainLog.Instance.Verbose("PRESENCE", "Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); | 85 | m_log.Info("[PRESENCE]: Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); |
88 | // Send | 86 | // Send |
89 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); | 87 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); |
90 | XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); | 88 | XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); |
@@ -292,7 +290,7 @@ namespace OpenSim.Grid.MessagingServer | |||
292 | } | 290 | } |
293 | catch (WebException e) | 291 | catch (WebException e) |
294 | { | 292 | { |
295 | MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " + | 293 | m_log.Warn("Error when trying to fetch Avatar's friends list: " + |
296 | e.Message); | 294 | e.Message); |
297 | // Return Empty list (no friends) | 295 | // Return Empty list (no friends) |
298 | } | 296 | } |
@@ -439,7 +437,7 @@ namespace OpenSim.Grid.MessagingServer | |||
439 | 437 | ||
440 | if (responseData.ContainsKey("error")) | 438 | if (responseData.ContainsKey("error")) |
441 | { | 439 | { |
442 | m_log.Error("GRID","error received from grid server" + responseData["error"]); | 440 | m_log.Error("[GRID]: error received from grid server" + responseData["error"]); |
443 | return null; | 441 | return null; |
444 | } | 442 | } |
445 | 443 | ||
@@ -465,7 +463,7 @@ namespace OpenSim.Grid.MessagingServer | |||
465 | } | 463 | } |
466 | catch (WebException) | 464 | catch (WebException) |
467 | { | 465 | { |
468 | MainLog.Instance.Error("GRID", | 466 | m_log.Error("[GRID]: " + |
469 | "Region lookup failed for: " + regionHandle.ToString() + | 467 | "Region lookup failed for: " + regionHandle.ToString() + |
470 | " - Is the GridServer down?"); | 468 | " - Is the GridServer down?"); |
471 | return null; | 469 | return null; |