- add: Service think
This commit is contained in:
15
Nebula.Launcher/Services/Logging/ConsoleLogger.cs
Normal file
15
Nebula.Launcher/Services/Logging/ConsoleLogger.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Nebula.Launcher.Services.Logging;
|
||||
|
||||
[ServiceRegister(typeof(ILogger))]
|
||||
public class ConsoleLogger : ILogger
|
||||
{
|
||||
public void Log(LoggerCategory loggerCategory, string message)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkCyan;
|
||||
Console.Write($"[{Enum.GetName(loggerCategory)}] ");
|
||||
Console.ResetColor();
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user