Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Logger.cs @ 5325

Last change on this file since 5325 was 5314, checked in by ascheibe, 13 years ago

#1233

  • added ItemView and Item for the Slave
  • added a Tray Icon App for data visualization and control of the slave windows service
  • added control methods to SlaveCommunication for controlling the slave core
  • fixed typo in namespace
File size: 1.0 KB
Line 
1using System;
2
3namespace HeuristicLab.Clients.Hive.Slave {
4  /// <summary>
5  /// Dummy implementation for a logger until a better solution is found;
6  /// to be removed in the future
7  /// TODO: send messages to gui
8  /// </summary>
9  public static class Logger {
10    private static object locker = new object();
11
12    public static void Debug(object message) {
13      lock (locker) {
14        Console.WriteLine(message.ToString());
15      }
16    }
17
18    public static void Info(object message) {
19      lock (locker) {
20        Console.WriteLine(message.ToString());
21      }
22    }
23
24    public static void Warn(object message) {
25      lock (locker) {
26        Console.WriteLine(message.ToString());
27      }
28    }
29
30    public static void Error(object message) {
31      lock (locker) {
32        Console.WriteLine(message.ToString());
33      }
34    }
35
36    public static void Error(object message, Exception e) {
37      lock (locker) {
38        Console.WriteLine(message.ToString() + " \n Exception is :" + e.ToString());
39      }
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.