- tweak: refactor funny
This commit is contained in:
13
Nebula.Shared/Services/Logging/ConsoleLogger.cs
Normal file
13
Nebula.Shared/Services/Logging/ConsoleLogger.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Nebula.Shared.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);
|
||||
}
|
||||
}
|
||||
6
Nebula.Shared/Services/Logging/ILogger.cs
Normal file
6
Nebula.Shared/Services/Logging/ILogger.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nebula.Shared.Services.Logging;
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
public void Log(LoggerCategory loggerCategory, string message);
|
||||
}
|
||||
Reference in New Issue
Block a user