Skip to content

Instantly share code, notes, and snippets.

@hastinbe
Last active October 6, 2015 13:08
Show Gist options
  • Select an option

  • Save hastinbe/79b176fde4c439c2ad68 to your computer and use it in GitHub Desktop.

Select an option

Save hastinbe/79b176fde4c439c2ad68 to your computer and use it in GitHub Desktop.
try {
switch (kind)
{
case TraceLevel.Error:
Console.ForegroundColor = ConsoleColor.Red;
break;
case TraceLevel.Warning:
Console.ForegroundColor = ConsoleColor.Yellow;
break;
case TraceLevel.Info:
Console.ForegroundColor = ConsoleColor.Gray;
break;
}
Console.WriteLine("[{0}] {1} {2}", context, kind, message);
} finally {
Console.ForegroundColor = ConsoleColor.Gray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment