diff --git a/Pack3r.Console/Program.cs b/Pack3r.Console/Program.cs index e552785..f571031 100644 --- a/Pack3r.Console/Program.cs +++ b/Pack3r.Console/Program.cs @@ -52,7 +52,13 @@ public static Task Main(string[] args) args = valid; } - return Cli.RunAsync(args); + return Cli.RunAsync(args, new CliSettings + { + Theme = new CliTheme(CliTheme.Default) + { + DefaultBgColor = System.Console.BackgroundColor, + }, + }); } public static async Task Execute(PackOptions options) diff --git a/Pack3r.Core/Logging/Logger.cs b/Pack3r.Core/Logging/Logger.cs index 694054c..f124267 100644 --- a/Pack3r.Core/Logging/Logger.cs +++ b/Pack3r.Core/Logging/Logger.cs @@ -100,6 +100,8 @@ public void Drain() private void LogInternalNoLock(LogLevel level, string message, string? context) { + Console.ResetColor(); + if (_minimumLogLevel == LogLevel.None) { Debug.Assert(level is LogLevel.Fatal, $"Invalid None loglevel got through: {level}"); @@ -118,7 +120,6 @@ private void LogInternalNoLock(LogLevel level, string message, string? context) if (!prefix.IsEmpty) { - if (backgroundColor.HasValue) { Console.BackgroundColor = backgroundColor.Value;