hytos / DTI_PID / SPPIDConverter_AutoModeling / Utill / Log.cs @ c7a0bb20
이력 | 보기 | 이력해설 | 다운로드 (782 Bytes)
1 |
using System; |
---|---|
2 |
using System.Windows.Forms; |
3 |
using System.Collections.Generic; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Drawing; |
7 |
using System.Threading; |
8 |
using System.Threading.Tasks; |
9 |
using System.IO; |
10 |
|
11 |
namespace SPPID.Utill |
12 |
{ |
13 |
public static class Log |
14 |
{ |
15 |
public static string logPath = ""; |
16 |
|
17 |
public static void WriteLine(Exception ex) |
18 |
{ |
19 |
using (StreamWriter sw = new StreamWriter(logPath, true)) |
20 |
{ |
21 |
sw.WriteLine(ex.Message); |
22 |
sw.WriteLine(ex.StackTrace); |
23 |
} |
24 |
} |
25 |
|
26 |
public static void WriteLine(string text) |
27 |
{ |
28 |
using (StreamWriter sw = new StreamWriter(logPath, true)) |
29 |
{ |
30 |
sw.WriteLine(text); |
31 |
} |
32 |
} |
33 |
} |
34 |
} |