public static void Log(string message, params object[] args) { if (args.Any()) { message = String.Format(message, args); } Console.WriteLine("{0}{1}" , ConsoleTime.GetTime(DateTime.Now) , message); }
public static void Warn(string message, params object[] args) { if (args.Any()) { message = String.Format(message, args); } ConsoleColor currentColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine("{0}Warn: {1}" , ConsoleTime.GetTime(DateTime.Now) , message); Console.ForegroundColor = currentColor; }
public static void Error(string message, params object[] args) { if (args.Any()) { message = String.Format(message, args); } ConsoleColor currentColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.DarkRed; Console.WriteLine("{0}Error: {1}" , ConsoleTime.GetTime(DateTime.Now) , message); Console.ForegroundColor = currentColor; Environment.Exit(-1); }