Signed-off-by: Eicy <im@crash.work>
This commit is contained in:
2024-12-17 00:23:59 +08:00
commit 88abc095c2
12 changed files with 1061 additions and 0 deletions

16
Utility/Console.cs Normal file
View File

@@ -0,0 +1,16 @@
using Lagrange.Core.Event.EventArg;
namespace Shrink.Utility;
public static class Console
{
public static void ChangeColorByTitle(this LogLevel level) => System.Console.ForegroundColor = level switch
{
LogLevel.Debug => ConsoleColor.White,
LogLevel.Verbose => ConsoleColor.DarkGray,
LogLevel.Information => ConsoleColor.Blue,
LogLevel.Warning => ConsoleColor.Yellow,
LogLevel.Fatal => ConsoleColor.Red,
_ => System.Console.ForegroundColor
};
}