Changeset 1371 for trunk/sources/HeuristicLab.Hive.Client.Core
- Timestamp:
- 03/19/09 17:30:33 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Client.Core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1368 r1371 69 69 abortRequested = false; 70 70 71 Logging. GetInstance().Info(this.ToString(), "Hive Client started");71 Logging.Instance.Info(this.ToString(), "Hive Client started"); 72 72 ClientConsoleServer server = new ClientConsoleServer(); 73 73 server.StartClientConsoleServer(new Uri("net.tcp://127.0.0.1:8000/ClientConsole/")); … … 102 102 MessageContainer container = queue.GetMessage(); 103 103 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()); 105 105 DetermineAction(container); 106 106 } … … 175 175 } 176 176 catch (InvalidStateException ise) { 177 Logging. GetInstance().Error(this.ToString(), "Exception: ", ise);177 Logging.Instance.Error(this.ToString(), "Exception: ", ise); 178 178 } 179 179 } … … 197 197 void wcfService_LoginCompleted(object sender, LoginCompletedEventArgs e) { 198 198 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); 200 200 } else 201 Logging. GetInstance().Error(this.ToString(), e.Result.StatusMessage);201 Logging.Instance.Error(this.ToString(), e.Result.StatusMessage); 202 202 } 203 203 … … 236 236 //better expand the sendjobresultcompltedeventargs with a boolean "snapshot?" flag 237 237 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"); 239 239 } else { 240 240 AppDomain.Unload(appDomains[e.Result.JobId]); … … 246 246 } 247 247 } 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"); 251 250 } 252 251 } … … 254 253 //Todo: First stop all threads, then terminate 255 254 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"); 257 256 lock (Locker) { 258 257 foreach (KeyValuePair<long, AppDomain> entries in appDomains) … … 270 269 //this is a little bit tricky - 271 270 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"); 273 272 274 273 foreach (KeyValuePair<long, Executor> execKVP in engines) { 275 274 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); 277 276 Thread finThread = new Thread(new ParameterizedThreadStart(GetFinishedJob)); 278 277 finThread.Start(execKVP.Value.JobId); … … 288 287 289 288 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()); 291 290 } 292 291 } -
trunk/sources/HeuristicLab.Hive.Client.Core/JobStorage/JobStorageManager.cs
r1364 r1371 28 28 storedJobsList.Add(info); 29 29 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"); 31 31 } 32 32 catch (Exception e) { 33 //Todo: Change to logging.exception! 34 Console.WriteLine(e); 33 Logging.Instance.Error("JobStorageManager", "Exception: ", e); 35 34 } 36 35 } … … 40 39 if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (storedJobsList[index-1].ServerIP == WcfService.Instance.ServerIP && storedJobsList[index-1].ServerPort == WcfService.Instance.ServerPort)) { 41 40 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"); 43 42 byte[] job = File.ReadAllBytes(path + filename + ".dat"); 44 43 … … 47 46 //TODO: has to be fixed from server side 48 47 //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"); 50 49 storedJobsList.Remove(storedJobsList[index - 1]); 51 50 File.Delete(path + filename + ".dat");
Note: See TracChangeset
for help on using the changeset viewer.