|
|
@ -42,7 +42,7 @@ namespace SlnMesnac.Serilog
|
|
|
|
|
|
|
|
|
|
|
|
#region 通过配置文件读取日志存放位置
|
|
|
|
#region 通过配置文件读取日志存放位置
|
|
|
|
var appConfig = app.ApplicationServices.GetService<AppConfig>();
|
|
|
|
var appConfig = app.ApplicationServices.GetService<AppConfig>();
|
|
|
|
var logPath = $"{appConfig.logPath}/Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
|
|
|
|
var logPath = $"Logs/{DateTime.UtcNow:yyyy-MM-dd}/";
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.Console()
|
|
|
|
Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.Console()
|
|
|
|