using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace fis.Loader { internal class Logger { static string dir = AppDomain.CurrentDomain.BaseDirectory; static string logFile = Path.Combine(dir, "update.log"); internal static void WriteLine(string logText) { if (!File.Exists(logFile)) { File.WriteAllText(logFile,$"{DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")} Fist time to create file"); } File.AppendAllText(logFile, $"\r\n{DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")} {logText}"); } } }