Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/09 17:30:33 (15 years ago)
Author:
kgrading
Message:

renamed the getLogger method (#529)

Location:
trunk/sources/HeuristicLab.Hive.Client.Core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r1368 r1371  
    6969      abortRequested = false;
    7070
    71       Logging.GetInstance().Info(this.ToString(), "Hive Client started");
     71      Logging.Instance.Info(this.ToString(), "Hive Client started");
    7272      ClientConsoleServer server = new ClientConsoleServer();
    7373      server.StartClientConsoleServer(new Uri("net.tcp://127.0.0.1:8000/ClientConsole/"));
     
    102102        MessageContainer container = queue.GetMessage();
    103103        Debug.WriteLine("Main loop received this message: " + container.Message.ToString());
    104         Logging.GetInstance().Info(this.ToString(), container.Message.ToString());
     104        Logging.Instance.Info(this.ToString(), container.Message.ToString());
    105105        DetermineAction(container);
    106106      }
     
    175175      }
    176176      catch (InvalidStateException ise) {
    177         Logging.GetInstance().Error(this.ToString(), "Exception: ", ise);
     177        Logging.Instance.Error(this.ToString(), "Exception: ", ise);
    178178      }
    179179    }
     
    197197    void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) {
    198198      if (e.Result.Success) {
    199         Logging.GetInstance().Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now);       
     199        Logging.Instance.Info(this.ToString(), "Login completed to Hive Server @ " + DateTime.Now);       
    200200      } else
    201         Logging.GetInstance().Error(this.ToString(), e.Result.StatusMessage);
     201        Logging.Instance.Error(this.ToString(), e.Result.StatusMessage);
    202202    }   
    203203
     
    236236          //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag
    237237          if (e.Result.finished == false) {
    238             Logging.GetInstance().Info(this.ToString(), "Snapshot for Job " + e.Result.JobId + " transmitted");
     238            Logging.Instance.Info(this.ToString(), "Snapshot for Job " + e.Result.JobId + " transmitted");
    239239          } else {
    240240            AppDomain.Unload(appDomains[e.Result.JobId]);
     
    246246          }
    247247        }       
    248       } else {
    249         //Todo: don't Java Style! IT'S EVIL!
    250         Logging.GetInstance().Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed");
     248      } else {       
     249        Logging.Instance.Error(this.ToString(), "Sending of job " + e.Result.JobId + " failed");
    251250      }
    252251    }
     
    254253    //Todo: First stop all threads, then terminate
    255254    void wcfService_ServerChanged(object sender, EventArgs e) {
    256       Logging.GetInstance().Info(this.ToString(), "ServerChanged has been called");
     255      Logging.Instance.Info(this.ToString(), "ServerChanged has been called");
    257256      lock (Locker) {
    258257        foreach (KeyValuePair<long, AppDomain> entries in appDomains)
     
    270269    //this is a little bit tricky -
    271270    void wcfService_ConnectionRestored(object sender, EventArgs e) {
    272       Logging.GetInstance().Info(this.ToString(), "Reconnected to old server - checking currently running appdomains");                 
     271      Logging.Instance.Info(this.ToString(), "Reconnected to old server - checking currently running appdomains");                 
    273272
    274273      foreach (KeyValuePair<long, Executor> execKVP in engines) {
    275274        if (!execKVP.Value.Running && execKVP.Value.CurrentMessage == MessageContainer.MessageType.NoMessage) {
    276           Logging.GetInstance().Info(this.ToString(), "Checking for JobId: " + execKVP.Value.JobId);
     275          Logging.Instance.Info(this.ToString(), "Checking for JobId: " + execKVP.Value.JobId);
    277276          Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob));
    278277          finThread.Start(execKVP.Value.JobId);
     
    288287
    289288    void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
    290       Logging.GetInstance().Error(this.ToString(), " Exception: " + e.ExceptionObject.ToString());
     289      Logging.Instance.Error(this.ToString(), " Exception: " + e.ExceptionObject.ToString());
    291290    }
    292291  }
  • trunk/sources/HeuristicLab.Hive.Client.Core/JobStorage/JobStorageManager.cs

    r1364 r1371  
    2828        storedJobsList.Add(info);
    2929        jobstream.Close();
    30         Logging.GetInstance().Info("JobStorrageManager", "Job " + info.JobID + " stored on the harddisc");
     30        Logging.Instance.Info("JobStorageManager", "Job " + info.JobID + " stored on the harddisc");
    3131      }
    3232      catch (Exception e) {
    33         //Todo: Change to logging.exception!
    34         Console.WriteLine(e);
     33        Logging.Instance.Error("JobStorageManager", "Exception: ", e);
    3534      }       
    3635    }
     
    4039        if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (storedJobsList[index-1].ServerIP == WcfService.Instance.ServerIP && storedJobsList[index-1].ServerPort == WcfService.Instance.ServerPort)) {
    4140          String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString();
    42           Logging.GetInstance().Info("JobStorrageManager", "Sending stored job " + storedJobsList[index-1].JobID + " to the server");
     41          Logging.Instance.Info("JobStorrageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
    4342          byte[] job = File.ReadAllBytes(path + filename + ".dat");
    4443         
     
    4746          //TODO: has to be fixed from server side
    4847          //if (res.Success == true) {
    49           Logging.GetInstance().Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done"); 
     48          Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done"); 
    5049          storedJobsList.Remove(storedJobsList[index - 1]);
    5150          File.Delete(path + filename + ".dat");
Note: See TracChangeset for help on using the changeset viewer.