Esempio n. 1
0
 public static void EndLine(LogFilePath logFilePath)
 {
     using (StreamWriter writer = new StreamWriter(logFilePath.path, true))
     {
         writer.WriteLine(endLine);
     }
 }
Esempio n. 2
0
 public static void Minimal(LogFilePath logFilePath, string line)
 {
     using (StreamWriter writer = new StreamWriter(logFilePath.path, true))
     {
         writer.WriteLine(line);
     }
 }
Esempio n. 3
0
 public static void InfoLine(LogFilePath logFilePath, MethodBase caller = null)
 {
     using (StreamWriter writer = new StreamWriter(logFilePath.path, true))
     {
         writer.WriteLine(getInfoLineString(caller));
     }
 }
Esempio n. 4
0
 public static void Error(LogFilePath logFilePath, Exception ex, MethodBase caller = null)
 {
     using (StreamWriter writer = new StreamWriter(logFilePath.path, true))
     {
         writer.WriteLine(getInfoLineString(caller));
         writer.WriteLine("Message: " + ex.Message);
         writer.WriteLine("Stacktrace: " + ex.StackTrace);
         writer.WriteLine(endLine);
     }
 }
Esempio n. 5
0
 public static void GameStarted(LogFilePath logFilePath)
 {
     using (StreamWriter writer = new StreamWriter(logFilePath.path, false))
     {
         for (int i = 0; i <= 3; i++)
         {
             writer.WriteLine(Regex.Replace(endLine, Environment.NewLine, ""));
         }
         writer.WriteLine(DateTime.Now.ToString() + ": Game started");
         writer.WriteLine(endLine);
     }
 }
Esempio n. 6
0
        public static void Block(LogFilePath logFilePath, string[] lines, MethodBase caller = null)
        {
            using (StreamWriter writer = new StreamWriter(logFilePath.path, true))
            {
                writer.WriteLine(getInfoLineString(caller));

                foreach (string line in lines)
                {
                    writer.WriteLine(line);
                }

                writer.WriteLine(endLine);
            }
        }