main
1using System;
2using System.IO;
3using System.Threading;
4
5namespace jive
6{
7 public class TextLogger : Logger
8 {
9 readonly TextWriter writer;
10
11 public TextLogger(TextWriter writer)
12 {
13 this.writer = writer;
14 }
15
16 public void informational(string formatted_string, params object[] arguments)
17 {
18 writer.WriteLine(formatted_string, arguments);
19 }
20
21 public void debug(string formatted_string, params object[] arguments)
22 {
23 writer.WriteLine("[{0}] - {1}", Thread.CurrentThread.ManagedThreadId,
24 formatted_string.format(arguments));
25 }
26
27 public void error(Exception e)
28 {
29 writer.WriteLine("{0}", e);
30 }
31 }
32}