From 024b39401c1ed21444dd640392b4d08d89866856 Mon Sep 17 00:00:00 2001 From: NicEastvillage Date: Sun, 30 Nov 2025 11:53:02 +0100 Subject: [PATCH 1/3] Change logger colors to be more readable --- RLBotCS/ManagerTools/Logging.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/RLBotCS/ManagerTools/Logging.cs b/RLBotCS/ManagerTools/Logging.cs index bcdaa94..f5cdd33 100644 --- a/RLBotCS/ManagerTools/Logging.cs +++ b/RLBotCS/ManagerTools/Logging.cs @@ -6,7 +6,7 @@ namespace RLBotCS.ManagerTools; public class Logging : ILogger { private const string Grey = "\x1b[38;20m"; - private const string LightBlue = "\x1b[94;20m"; + private const string Cyan = "\x1b[36;20m"; private const string Yellow = "\x1b[33;20m"; private const string Green = "\x1b[32;20m"; private const string Red = "\x1b[31;20m"; @@ -63,9 +63,9 @@ public void Log( var logBuilder = new StringBuilder(); logBuilder.Append($"{logLevelColors[0]}{DateTime.Now:HH:mm:ss}{Reset} "); logBuilder.Append( - $"{logLevelColors[1]}{logLevelString}:{Reset}{Green}{AppName}{Reset}" + $"{logLevelColors[1]}{logLevelString}{Reset}{Green}{AppName}{Reset}" ); - logBuilder.Append($"{logLevelColors[2]}[ {_name} ]{Reset} "); + logBuilder.Append($"{logLevelColors[2]} {_name}:{Reset} "); logBuilder.Append($"{logLevelColors[3]}{message}{Reset}"); Console.WriteLine(logBuilder.ToString()); @@ -76,8 +76,8 @@ private string[] GetLogLevelColors(LogLevel logLevel) => logLevel switch { LogLevel.Trace => new[] { Grey, Grey, Grey, Grey }, - LogLevel.Debug => new[] { Grey, Grey, Grey, LightBlue }, - LogLevel.Information => new[] { Grey, LightBlue, Grey, LightBlue }, + LogLevel.Debug => new[] { Grey, Cyan, Grey, Cyan }, + LogLevel.Information => new[] { Grey, Grey, Grey, Cyan }, LogLevel.Warning => new[] { Yellow, Yellow, Yellow, Yellow }, LogLevel.Error => new[] { Red, Red, Red, Red }, LogLevel.Critical => new[] { Red, BoldRed, Red, BoldRed }, @@ -87,13 +87,13 @@ private string[] GetLogLevelColors(LogLevel logLevel) => private string GetLogLevelString(LogLevel logLevel) => logLevel switch { - LogLevel.Trace => "TRACE".PadLeft(8), - LogLevel.Debug => "DEBUG".PadLeft(8), - LogLevel.Information => "INFO".PadLeft(8), - LogLevel.Warning => "WARNING".PadLeft(8), - LogLevel.Error => "ERROR".PadLeft(8), - LogLevel.Critical => "CRITICAL".PadLeft(8), - _ => "UNKNOWN".PadLeft(8), + LogLevel.Trace => "TRACE".PadLeft(5), + LogLevel.Debug => "DEBUG".PadLeft(5), + LogLevel.Information => "INFO".PadLeft(5), + LogLevel.Warning => "WARN".PadLeft(5), + LogLevel.Error => "ERROR".PadLeft(5), + LogLevel.Critical => "CRIT".PadLeft(5), + _ => "UNKN".PadLeft(5), }; public class CustomConsoleLoggerProvider : ILoggerProvider From c615a039c36c98197e4e0d10c7f42a122fd35c2c Mon Sep 17 00:00:00 2001 From: NicEastvillage Date: Sun, 30 Nov 2025 13:22:08 +0100 Subject: [PATCH 2/3] Undo color change --- RLBotCS/ManagerTools/Logging.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RLBotCS/ManagerTools/Logging.cs b/RLBotCS/ManagerTools/Logging.cs index f5cdd33..6129034 100644 --- a/RLBotCS/ManagerTools/Logging.cs +++ b/RLBotCS/ManagerTools/Logging.cs @@ -6,7 +6,7 @@ namespace RLBotCS.ManagerTools; public class Logging : ILogger { private const string Grey = "\x1b[38;20m"; - private const string Cyan = "\x1b[36;20m"; + private const string LightBlue = "\x1b[34;20m"; private const string Yellow = "\x1b[33;20m"; private const string Green = "\x1b[32;20m"; private const string Red = "\x1b[31;20m"; @@ -76,8 +76,8 @@ private string[] GetLogLevelColors(LogLevel logLevel) => logLevel switch { LogLevel.Trace => new[] { Grey, Grey, Grey, Grey }, - LogLevel.Debug => new[] { Grey, Cyan, Grey, Cyan }, - LogLevel.Information => new[] { Grey, Grey, Grey, Cyan }, + LogLevel.Debug => new[] { Grey, Grey, Grey, LightBlue }, + LogLevel.Information => new[] { Grey, LightBlue, Grey, LightBlue }, LogLevel.Warning => new[] { Yellow, Yellow, Yellow, Yellow }, LogLevel.Error => new[] { Red, Red, Red, Red }, LogLevel.Critical => new[] { Red, BoldRed, Red, BoldRed }, From 27e27fbaf70cf83c7eac0f58b18e1f9ab10f647c Mon Sep 17 00:00:00 2001 From: NicEastvillage Date: Sun, 30 Nov 2025 13:22:38 +0100 Subject: [PATCH 3/3] Fr this time --- RLBotCS/ManagerTools/Logging.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RLBotCS/ManagerTools/Logging.cs b/RLBotCS/ManagerTools/Logging.cs index 6129034..964b484 100644 --- a/RLBotCS/ManagerTools/Logging.cs +++ b/RLBotCS/ManagerTools/Logging.cs @@ -6,7 +6,7 @@ namespace RLBotCS.ManagerTools; public class Logging : ILogger { private const string Grey = "\x1b[38;20m"; - private const string LightBlue = "\x1b[34;20m"; + private const string LightBlue = "\x1b[94;20m"; private const string Yellow = "\x1b[33;20m"; private const string Green = "\x1b[32;20m"; private const string Red = "\x1b[31;20m";