Free cookie consent management tool by TermsFeed Policy Generator

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

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

ported most of the slave code to 3.4 #1233

File size: 1.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6
7namespace HeuristicLab.Clients.Hive.Salve {
8  /// <summary>
9  /// Dummy implementation for a logger until a better solution is found;
10  /// to be removed in the future
11  /// TODO: send messages to gui
12  /// </summary>
13  internal static class Logger {   
14    private static object locker = new object();
15
16    public static void Debug(object message) {
17      lock (locker) {
18        Console.WriteLine(message.ToString());
19      }
20    }
21
22    public static void Info(object message) {
23      lock (locker) {
24        Console.WriteLine(message.ToString());
25      }
26    }
27
28    public static void Warn(object message) {
29      lock (locker) {
30        Console.WriteLine(message.ToString());
31      }
32    }
33
34    public static void Error(object message) {
35      lock (locker) {
36        Console.WriteLine(message.ToString());
37      }
38    }
39
40    public static void Error(object message, Exception e) {
41      lock (locker) {
42        Console.WriteLine(message.ToString() + " \n Exception is :" + e.ToString());
43      }
44    }   
45  }
46}
Note: See TracBrowser for help on using the repository browser.