-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsoleLog.cs
106 lines (104 loc) · 3.02 KB
/
ConsoleLog.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading.Tasks;
namespace s2._3
{
class ConsoleLog : TextWriter
{
StreamWriter SW;
TextWriter TW;
public ConsoleLog(string logPath, TextWriter writer)
{
SW = new StreamWriter(logPath);
TW = writer;
}
public override Encoding Encoding => throw new NotImplementedException();
public override void WriteLine()
{
TW.WriteLine();
SW.WriteLine();
}
public override void WriteLine(string format, object arg0)
{
TW.WriteLine(format, arg0);
SW.WriteLine(String.Format(format, arg0));
}
public override void WriteLine(string format, params object[] arg)
{
TW.WriteLine(format, arg);
SW.WriteLine(String.Format(format, arg));
}
public override void WriteLine(string format, object arg0, object arg1, object arg2)
{
TW.WriteLine(format, arg0, arg1, arg2);
SW.WriteLine(String.Format(format, arg0, arg1, arg2));
}
public override void WriteLine(string format, object arg0, object arg1)
{
TW.WriteLine(format, arg0, arg1);
SW.WriteLine(String.Format(format, arg0, arg1));
}
public override void WriteLine(object value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(int value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(decimal value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(char value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(string value)
{
SW.WriteLine(value);
}
public override void WriteLine(char[] buffer, int index, int count)
{
TW.WriteLine(buffer, index, count);
SW.WriteLine(buffer, index, count);
}
public override void WriteLine(bool value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(char[] buffer)
{
TW.WriteLine(buffer);
SW.WriteLine(buffer);
}
public override void WriteLine(long value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(ulong value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(float value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
public override void WriteLine(uint value)
{
TW.WriteLine(value);
SW.WriteLine(value);
}
}
}