Modified loggers to use their enclosing class
[pithos-ms-client] / trunk / Pithos.Core / PithosMonitor.cs
index 2495b10..567be26 100644 (file)
@@ -45,6 +45,7 @@ using System.ComponentModel.Composition;
 using System.Diagnostics.Contracts;
 using System.IO;
 using System.Linq;
+using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
 using Pithos.Core.Agents;
@@ -57,6 +58,8 @@ namespace Pithos.Core
     [Export(typeof(PithosMonitor))]
     public class PithosMonitor:IDisposable
     {
+        private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
         private int _blockSize;
         private string _blockHash;
 
@@ -129,11 +132,10 @@ namespace Pithos.Core
         }
 
         private AccountInfo _accountInfo;
-        
-       
 
 
-        private static readonly ILog Log = LogManager.GetLogger(typeof(PithosMonitor));
+
+
 
 
         public bool Pause
@@ -361,8 +363,6 @@ namespace Pithos.Core
         private void StartNetworkAgent()
         {
 
-            NetworkAgent.AddAccount(_accountInfo);
-
             NetworkAgent.StatusNotification = StatusNotification;
                         
             NetworkAgent.Start();