a logolás külön fájlba került

This commit is contained in:
balos 2025-04-26 20:39:32 +02:00
parent f680dd869b
commit e97a4e7a66
2 changed files with 25 additions and 10 deletions

22
logger.cs Normal file
View file

@ -0,0 +1,22 @@
using Microsoft.Extensions.Logging;
namespace T3k3rg0
{
public static class Logger
{
public static ILoggerFactory CreateLoggerFactory()
{
return LoggerFactory.Create(builder =>
{
builder
.AddSimpleConsole(options =>
{
options.TimestampFormat = "[yyyy-MM-dd HH:mm:ss] ";
options.SingleLine = true;
options.ColorBehavior = Microsoft.Extensions.Logging.Console.LoggerColorBehavior.Enabled;
})
.SetMinimumLevel(LogLevel.Debug);
});
}
}
}