aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/Communications/Capabilities
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-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/Capabilities')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs38
1 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index f85b4ab..6473c26 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -54,6 +54,8 @@ namespace OpenSim.Region.Capabilities
54 54
55 public class Caps 55 public class Caps
56 { 56 {
57 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
58
57 private string m_httpListenerHostName; 59 private string m_httpListenerHostName;
58 private uint m_httpListenPort; 60 private uint m_httpListenPort;
59 61
@@ -96,7 +98,7 @@ namespace OpenSim.Region.Capabilities
96 /// </summary> 98 /// </summary>
97 public void RegisterHandlers() 99 public void RegisterHandlers()
98 { 100 {
99 MainLog.Instance.Verbose("CAPS", "Registering CAPS handlers"); 101 m_log.Info("[CAPS]: Registering CAPS handlers");
100 string capsBase = "/CAPS/" + m_capsObjectPath; 102 string capsBase = "/CAPS/" + m_capsObjectPath;
101 try 103 try
102 { 104 {
@@ -115,7 +117,7 @@ namespace OpenSim.Region.Capabilities
115 } 117 }
116 catch (Exception e) 118 catch (Exception e)
117 { 119 {
118 MainLog.Instance.Error("CAPS", e.ToString()); 120 m_log.Error("[CAPS]: " + e.ToString());
119 } 121 }
120 } 122 }
121 123
@@ -275,7 +277,7 @@ namespace OpenSim.Region.Capabilities
275 { 277 {
276 try 278 try
277 { 279 {
278// MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param); 280// m_log.Debug(String.Format("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param));
279 281
280 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); 282 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request));
281 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); 283 LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
@@ -303,16 +305,16 @@ namespace OpenSim.Region.Capabilities
303 uploadResponse.uploader = uploaderURL; 305 uploadResponse.uploader = uploaderURL;
304 uploadResponse.state = "upload"; 306 uploadResponse.state = "upload";
305 307
306// MainLog.Instance.Verbose( 308// m_log.Info(
307// "CAPS", 309// String.Format("[CAPS]: " +
308// "ScriptTaskInventory response: {0}", 310// "ScriptTaskInventory response: {0}",
309// LLSDHelpers.SerialiseLLSDReply(uploadResponse)); 311// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
310 312
311 return LLSDHelpers.SerialiseLLSDReply(uploadResponse); 313 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
312 } 314 }
313 catch (Exception e) 315 catch (Exception e)
314 { 316 {
315 MainLog.Instance.Error("CAPS", e.ToString()); 317 m_log.Error("[CAPS]: " + e.ToString());
316 } 318 }
317 319
318 return null; 320 return null;
@@ -349,10 +351,10 @@ namespace OpenSim.Region.Capabilities
349 uploadResponse.uploader = uploaderURL; 351 uploadResponse.uploader = uploaderURL;
350 uploadResponse.state = "upload"; 352 uploadResponse.state = "upload";
351 353
352// MainLog.Instance.Verbose( 354// m_log.Info(
353// "CAPS", 355// String.Format("[CAPS]: " +
354// "NoteCardAgentInventory response: {0}", 356// "NoteCardAgentInventory response: {0}",
355// LLSDHelpers.SerialiseLLSDReply(uploadResponse)); 357// LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
356 358
357 return LLSDHelpers.SerialiseLLSDReply(uploadResponse); 359 return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
358 } 360 }
@@ -681,10 +683,10 @@ namespace OpenSim.Region.Capabilities
681 { 683 {
682 try 684 try
683 { 685 {
684// MainLog.Instance.Verbose( 686// m_log.Info(
685// "CAPS", 687// String.Format("[CAPS]: " +
686// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", 688// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
687// data, path, param); 689// data, path, param));
688 690
689 string res = String.Empty; 691 string res = String.Empty;
690 LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); 692 LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete();
@@ -707,13 +709,13 @@ namespace OpenSim.Region.Capabilities
707 SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); 709 SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data);
708 } 710 }
709 711
710// MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); 712// m_log.Info(String.Format("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res));
711 713
712 return res; 714 return res;
713 } 715 }
714 catch (Exception e) 716 catch (Exception e)
715 { 717 {
716 MainLog.Instance.Error("CAPS", e.ToString()); 718 m_log.Error("[CAPS]: " + e.ToString());
717 } 719 }
718 720
719 // XXX Maybe this should be some meaningful error packet 721 // XXX Maybe this should be some meaningful error packet