public static void EndLine(LogFilePath logFilePath) { using (StreamWriter writer = new StreamWriter(logFilePath.path, true)) { writer.WriteLine(endLine); } }
public static void Minimal(LogFilePath logFilePath, string line) { using (StreamWriter writer = new StreamWriter(logFilePath.path, true)) { writer.WriteLine(line); } }
public static void InfoLine(LogFilePath logFilePath, MethodBase caller = null) { using (StreamWriter writer = new StreamWriter(logFilePath.path, true)) { writer.WriteLine(getInfoLineString(caller)); } }
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); } }
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); } }
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); } }