Exemplo n.º 1
0
 public static Boolean Txt_WriteLine(string filePath, string text, bool isAppend = true)
 {
     IO_Helper_DG.CreateFileIfNotExist(filePath);
     using (StreamWriter log = new StreamWriter(filePath, isAppend))
     {
         log.WriteLine(text);
     }
     return(true);
 }
Exemplo n.º 2
0
 //Out Put Method
 private static void OutPutStreamWriter(string logLocation, string logTitle, string logText, bool isAppend = true)
 {
     IO_Helper_DG.CreateDirectoryIfNotExist(logLocation);
     using (StreamWriter log = new StreamWriter($"{logLocation}Log_{DateTime.Now.ToDateString()}.Log", isAppend))
     {
         log.WriteLine();
         log.WriteLine($"{DateTime_Helper_DG.Get_DateTime_Now_24HourType()}   ---- {logTitle} Log !------");
         log.WriteLine(logText);
     }
 }