forked from ruCyberPoison/vinchuca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Logger.cs
31 lines (27 loc) · 814 Bytes
/
Logger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.Diagnostics;
namespace Vinchuca
{
[Remove]
public class Log
{
private readonly TraceSource _source;
private static readonly TraceListener Ctl = new ColorConsoleTraceListener(0);
public Log(TraceSource source)
{
_source = source;
_source.Listeners.Add(Ctl);
}
public void Info(string format, params object[] p)
{
_source.TraceEvent(TraceEventType.Information, 0, format, p);
}
public void Verbose(string format, params object[] p)
{
_source.TraceEvent(TraceEventType.Verbose, 0, format, p);
}
public void Warn(string format, params object[] p)
{
_source.TraceEvent(TraceEventType.Warning, 0, format, p);
}
}
}