Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Core;
|
---|
6 |
|
---|
7 | namespace 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.