forked from arkane-systems/mousejiggler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogger.cs
34 lines (31 loc) · 991 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
32
33
34
using System;
using System.IO;
namespace CutrightIndustries.ScreenAlive
{
class Logger
{
public const string LOGFILE_PATH = "screenalive-log.txt";
public static bool DEBUG_MODE = true;
public static void Debug(params string[] str)
{
if (DEBUG_MODE)
{
string time = DateTime.Now.ToString("MM/dd/yyyy h:mm:ss tt");
string content = "[" + time + "] ";
for (int i = 0; i < str.Length; i++)
content += str[i];
File.AppendAllText(LOGFILE_PATH, content + "\n");
}
}
public static void DebugWithoutTimestamp(params string[] str)
{
if (DEBUG_MODE)
{
string content = " ";
for (int i = 0; i < str.Length; i++)
content += str[i];
File.AppendAllText(LOGFILE_PATH, content + "\n");
}
}
}
}