Subversion Repositories Code-Repo

Rev

Rev 53 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 53 Rev 55
Line 11... Line 11...
11
    {
11
    {
12
        private static string debugLocation = "StatusLog.txt";
12
        private static string debugLocation = "StatusLog.txt";
13
        public static void appendText(string text)
13
        public static void appendText(string text)
14
        {
14
        {
15
            // Appends passed string into Debug.txt
15
            // Appends passed string into Debug.txt
16
            if (!File.Exists(debugLocation))
-
 
17
                File.Create(debugLocation);
-
 
18
            using (StreamWriter sw = File.AppendText(debugLocation))
16
            using (StreamWriter sw = File.AppendText(debugLocation))
19
            {
17
            {
20
                sw.Write("[" + DateTime.Now.ToLongDateString() + " | " + DateTime.Now.ToLongTimeString() + "] -- ");
18
                sw.Write("[" + DateTime.Now.ToLongDateString() + " | " + DateTime.Now.ToLongTimeString() + "] -- ");
21
                sw.Write(text + "\r\n");
19
                sw.Write(text + "\r\n");
22
                sw.Flush();
20
                sw.Flush();
Line 31... Line 29...
31
                File.Create(debugLocation);
29
                File.Create(debugLocation);
32
            }
30
            }
33
        }
31
        }
34
        public static void startNewSession()
32
        public static void startNewSession()
35
        {
33
        {
36
            if (!File.Exists(debugLocation))
-
 
37
                File.Create(debugLocation);
-
 
38
            using (StreamWriter sw = File.AppendText(debugLocation))
34
            using (StreamWriter sw = File.AppendText(debugLocation))
39
            {
35
            {
40
                sw.Write("-- New Session --\r\n");
36
                sw.Write("-- New Session --\r\n");
41
                sw.Flush();
37
                sw.Flush();
42
            }
38
            }