private void ProcessLogMessage(string message, MessageType messageType) { string logMessage = timeSinceStart.Elapsed + " : "; switch (messageType) { case MessageType.Info: logMessage += message; break; case MessageType.Correct: Console.ForegroundColor = ConsoleColor.Green; logMessage += "<OK> " + message; break; case MessageType.Warning: Console.ForegroundColor = ConsoleColor.Yellow; logMessage += "<WARNING> " + message; break; case MessageType.Error: Console.ForegroundColor = ConsoleColor.Red; logMessage += "<ERROR> " + message; break; default: break; } Console.WriteLine(logMessage); file.WriteLine(logMessage); logView.AddText(logMessage); Console.ForegroundColor = ConsoleColor.White; }
private void RTL_CallbackLog(string data) { logger.AddText(data); }