public void WriteCore(Severity type, object context, string text) { string loc = MessageSink.LocationString(context); if (!string.IsNullOrEmpty(loc)) { text = loc + ": " + text; } Trace.WriteLine(text, type.ToString()); }
public static void WriteColoredMessage(ConsoleColor color, object context, string text) { string loc = MessageSink.LocationString(context); if (!string.IsNullOrEmpty(loc)) { Console.Write(loc + ": "); } ConsoleColor oldColor = Console.ForegroundColor; Console.ForegroundColor = color; Console.WriteLine(text); Console.ForegroundColor = oldColor; }
void WriteCore(Severity type, object context, string text) { string loc = MessageSink.LocationString(context); if (!string.IsNullOrEmpty(loc)) { Console.Write(loc + ": "); } string typeText; ConsoleColor oldColor = Console.ForegroundColor; Console.ForegroundColor = PickColor(type, out typeText); if (typeText != null) { text = typeText + ": " + text; } Console.WriteLine(text); Console.ForegroundColor = oldColor; }