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/Framework/Communications/RestClient/RestClient.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/Framework/Communications/RestClient/RestClient.cs')
-rw-r--r-- | OpenSim/Framework/Communications/RestClient/RestClient.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs index 76bad64..f968c9a 100644 --- a/OpenSim/Framework/Communications/RestClient/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs | |||
@@ -56,6 +56,8 @@ namespace OpenSim.Framework.Communications | |||
56 | /// </remarks> | 56 | /// </remarks> |
57 | public class RestClient | 57 | public class RestClient |
58 | { | 58 | { |
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
60 | |||
59 | private string realuri; | 61 | private string realuri; |
60 | 62 | ||
61 | #region member variables | 63 | #region member variables |
@@ -238,7 +240,7 @@ namespace OpenSim.Framework.Communications | |||
238 | } | 240 | } |
239 | } | 241 | } |
240 | realuri = sb.ToString(); | 242 | realuri = sb.ToString(); |
241 | MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); | 243 | m_log.Info(String.Format("[REST]: RestURL: {0}", realuri)); |
242 | return new Uri(sb.ToString()); | 244 | return new Uri(sb.ToString()); |
243 | } | 245 | } |
244 | 246 | ||
@@ -374,16 +376,16 @@ namespace OpenSim.Framework.Communications | |||
374 | _asyncException = null; | 376 | _asyncException = null; |
375 | _request.ContentLength = src.Length; | 377 | _request.ContentLength = src.Length; |
376 | 378 | ||
377 | MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); | 379 | m_log.Info(String.Format("[REST]: Request Length {0}", _request.ContentLength)); |
378 | MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); | 380 | m_log.Info(String.Format("[REST]: Sending Web Request {0}", buildUri())); |
379 | src.Seek(0, SeekOrigin.Begin); | 381 | src.Seek(0, SeekOrigin.Begin); |
380 | MainLog.Instance.Verbose("REST", "Seek is ok"); | 382 | m_log.Info("[REST]: Seek is ok"); |
381 | Stream dst = _request.GetRequestStream(); | 383 | Stream dst = _request.GetRequestStream(); |
382 | MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); | 384 | m_log.Info("[REST]: GetRequestStream is ok"); |
383 | 385 | ||
384 | byte[] buf = new byte[1024]; | 386 | byte[] buf = new byte[1024]; |
385 | int length = src.Read(buf, 0, 1024); | 387 | int length = src.Read(buf, 0, 1024); |
386 | MainLog.Instance.Verbose("REST", "First Read is ok"); | 388 | m_log.Info("[REST]: First Read is ok"); |
387 | while (length > 0) | 389 | while (length > 0) |
388 | { | 390 | { |
389 | dst.Write(buf, 0, length); | 391 | dst.Write(buf, 0, length); |