Skip to content

Commit 1151a76

Browse files
committed
Just paint the foreground when colouring a log message.
For modern terminals that are on black, there's no difference. For ISE users with a blue background, it's nicer to not colour it. The ISE doesn't, so why should we?
1 parent 53382d0 commit 1151a76

20 files changed

Lines changed: 3 additions & 4 deletions

src/PSADT/PSAppDeployToolkit/Logging/LogUtilities.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public static IReadOnlyList<LogEntry> WriteLogEntry(IReadOnlyList<string> messag
143143
if (colouredOutput)
144144
{
145145
Console.ForegroundColor = sevCols["ForegroundColor"];
146-
Console.BackgroundColor = sevCols["BackgroundColor"];
147146
}
148147
if (severity == LogSeverity.Error)
149148
{
@@ -296,10 +295,10 @@ static void AppendLowMarker(StringBuilder sb, char low)
296295
/// </summary>
297296
private static readonly ReadOnlyCollection<ReadOnlyDictionary<string, ConsoleColor>> LogSeverityColors = new(
298297
[
299-
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Green }, { "BackgroundColor", ConsoleColor.Black } }),
298+
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Green } }),
300299
new(new Dictionary<string, ConsoleColor>() { }),
301-
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Yellow }, { "BackgroundColor", ConsoleColor.Black } }),
302-
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Red }, { "BackgroundColor", ConsoleColor.Black } }),
300+
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Yellow } }),
301+
new(new Dictionary<string, ConsoleColor>() { { "ForegroundColor", ConsoleColor.Red } }),
303302
]);
304303

305304
/// <summary>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)