Готов к pull
This commit is contained in:
parent
0a4cfe48c3
commit
9c0a1678a0
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
@ -30,7 +31,7 @@ namespace WarmlyShip
|
|||||||
{
|
{
|
||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
.SetBasePath(Directory.GetCurrentDirectory())
|
.SetBasePath(Directory.GetCurrentDirectory())
|
||||||
.AddJsonFile(path: "appsettings.json", optional: false, reloadOnChange: true)
|
.AddJsonFile(path: "serilogConfig.json", optional: false, reloadOnChange: true)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var logger = new LoggerConfiguration()
|
var logger = new LoggerConfiguration()
|
||||||
|
@ -8,10 +8,9 @@
|
|||||||
"Args": {
|
"Args": {
|
||||||
"path": "Logs/log_.log",
|
"path": "Logs/log_.log",
|
||||||
"rollingInterval": "Day",
|
"rollingInterval": "Day",
|
||||||
"outputTemplate": "{Level:u4}: {Message:lj} [{Timestamp:HH:mm:ss.fff}]{NewLine}"
|
"outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user