|
|
|
@ -18,17 +18,6 @@ public class Program |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog((context, loggerConfiguration) => |
|
|
|
{ |
|
|
|
loggerConfiguration |
|
|
|
#if DEBUG
|
|
|
|
.MinimumLevel.Debug() |
|
|
|
#else
|
|
|
|
.MinimumLevel.Information() |
|
|
|
#endif
|
|
|
|
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) |
|
|
|
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) |
|
|
|
.Enrich.FromLogContext() |
|
|
|
.WriteTo.Async(c => c.File("Logs/logs.txt")) |
|
|
|
.WriteTo.Async(c => c.Console()); |
|
|
|
SerilogToEsExtensions.SetSerilogConfiguration( |
|
|
|
loggerConfiguration, |
|
|
|
context.Configuration); |
|
|
|
|