-
Notifications
You must be signed in to change notification settings - Fork 14
/
Logger.cs
61 lines (50 loc) · 1.27 KB
/
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
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
/*
* Created by SharpDevelop.
* User: mifus_000
* Date: 20/05/2017
* Time: 15:46
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.IO;
/// <summary>
/// Description of Logger.
/// </summary>
public class Logger
{
public Logger()
{
}
public static void loggerindicators(string value)
{
try
{
value = "[" + DateTime.Now.ToString() + "] - " + value;
Console.WriteLine(value);
System.IO.StreamWriter w = new System.IO.StreamWriter(Program.location + @"\logIndicators\" + DateTime.Now.ToString("yyyyMMdd") + "loggerIndicators.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
w = null;
}
catch
{
}
}
public static void log(string value)
{
value = "[" + DateTime.Now.ToString() + "] - " + value;
Console.WriteLine(value);
try
{
System.IO.StreamWriter w = new StreamWriter(Program.location + @"\log\" + DateTime.Now.ToString("yyyyMMdd") + "_log.txt", true);
w.WriteLine(value);
w.Close();
w.Dispose();
w = null;
}
catch
{ }
}
}