Color in console logs
Uses Yellow for Warnings, Red for Error and Criticals
More colors can be added.
MODIFY
WalletWasabi/Logging/Logger.cs
WalletWasabi/Logging/Logger.cs
@@ -111,7 +111,24 @@ namespace WalletWasabi.Logging
{
if (Modes.Contains(LogMode.Console))
{
+ lock (Console.Out)
+ {
+ var color = Console.ForegroundColor;
+ switch (level)
+ {
+ case LogLevel.Warning:
+ color = ConsoleColor.Yellow;
+ break;
+ case LogLevel.Error:
+ case LogLevel.Critical:
+ color = ConsoleColor.Red;
+ break;
+ }
+
+ Console.ForegroundColor = color;
Console.Write(finalLogMessage);
+ Console.ResetColor();
+ }
}
if (Modes.Contains(LogMode.Console))

Color in console logs

Uses Yellow for Warnings, Red for Error and Criticals
More colors can be added.