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