public static void IniciarLOG(string Text) { Console.WriteLine(_path); try { if (!File.Exists(_path)) { using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8)) { write.WriteLine(SistemLog.StringLog(Text)); write.Flush(); write.Close(); } } else { File.Delete(_path); using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8)) { write.WriteLine(SistemLog.StringLog(Text)); write.Flush(); write.Close(); } } } catch (Exception e) { } }
public static void SalvarLog(string Text) { try { using (StreamWriter write = new StreamWriter(_path, true, Encoding.UTF8)) { write.WriteLine(SistemLog.StringLog(Text)); write.Flush(); write.Close(); } } catch (Exception e) { } }