Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/02/11 18:42:44 (13 years ago)
Author:
ascheibe
Message:

#1233 slave: catch more errors and log them to the windows event log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient/3.3/Program.cs

    r6744 r6945  
    2121
    2222using System;
     23using System.Diagnostics;
    2324using System.Threading;
    2425
     
    2627  public class Program {
    2728    static void Main(string[] args) {
     29      EventLog eventLog = null;
     30      try {
     31        if (!System.Diagnostics.EventLog.SourceExists("HLHive")) {
     32          System.Diagnostics.EventLog.CreateEventSource("HLHive", "HiveSlave");
     33        }
     34        eventLog = new EventLog();
     35        eventLog.Source = "HLHive";
     36        eventLog.Log = "HiveSlave";
     37      }
     38      catch (Exception) { }
     39
    2840      //slave part
    2941      Core core = new Core();
     42      core.ServiceEventLog = eventLog;
    3043      Console.WriteLine("Starting core ...");
    3144      Thread coreThread = new Thread(core.Start);
Note: See TracChangeset for help on using the changeset viewer.