a logolás külön fájlba került
This commit is contained in:
parent
f680dd869b
commit
e97a4e7a66
2 changed files with 25 additions and 10 deletions
22
logger.cs
Normal file
22
logger.cs
Normal 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue