diff --git a/src/NuGetForUnity.Cli/Fakes/Debug.cs b/src/NuGetForUnity.Cli/Fakes/Debug.cs index d37d9b76..30f55faf 100644 --- a/src/NuGetForUnity.Cli/Fakes/Debug.cs +++ b/src/NuGetForUnity.Cli/Fakes/Debug.cs @@ -21,34 +21,43 @@ internal static void LogFormat(string format, params object[] args) Console.WriteLine(format, args); } - internal static void Log(string format, params object[] args) + internal static void Log(string message) { - Console.WriteLine(format, args); + Console.WriteLine(message); } - internal static void LogWarning(string format, params object[] args) + internal static void LogWarning(string message) { var oldForegroundColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.DarkYellow; - Console.WriteLine(format, args); + Console.WriteLine(message); Console.ForegroundColor = oldForegroundColor; } internal static void LogWarningFormat(string format, params object[] args) { + var oldForegroundColor = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.DarkYellow; Console.WriteLine(format, args); + Console.ForegroundColor = oldForegroundColor; } - internal static void LogError(string format, params object[] args) + internal static void LogError(string message) { HasError = true; - Console.Error.WriteLine(format, args); + var oldForegroundColor = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.DarkRed; + Console.Error.WriteLine(message); + Console.ForegroundColor = oldForegroundColor; } internal static void LogException(Exception e) { HasError = true; + var oldForegroundColor = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.DarkRed; Console.Error.WriteLine(e.ToString()); + Console.ForegroundColor = oldForegroundColor; } [Conditional("DEBUG")]