Add simple Log text file

public static void LogMessage(string Message) { string LogFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “MyLog.txt”); //string LogFilePath=Path.Combine(Path.GetTempPath(),”CompassTemplatesLog.txt”); if (!File.Exists(LogFilePath)) { byte[] fileBytes = null; fileBytes = Encoding.GetEncoding(1252).GetBytes(” Log – \r\n_______________\n”); using (Stream streamToWrite = File.Create(LogFilePath)) { streamToWrite.Write(fileBytes, 0, fileBytes.Length); streamToWrite.Flush(); } } using (StreamWriter Writer = File.AppendText(LogFilePath)) { Writer.WriteLine(Message); Writer.Flush(); } } ¬† implementation ¬† ¬†LogMessage(“Start “+DateTime.Now);