using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Logger { public class MessageLogger { private static string _logPath = "log.txt"; public static void Log(string message) { Console.WriteLine(message); File.AppendAllText(_logPath, string.Format("{0} | {1}{2}", DateTime.Now, message, Environment.NewLine)); } } }