diff --git a/FarmmapsApi/FarmmapsProgram.cs b/FarmmapsApi/FarmmapsProgram.cs index 46e30d2..ea25201 100644 --- a/FarmmapsApi/FarmmapsProgram.cs +++ b/FarmmapsApi/FarmmapsProgram.cs @@ -59,11 +59,15 @@ namespace FarmmapsApi private static void ConfigureLogger(IServiceProvider serviceProvider) { var isMicrosoftNamespace = Matching.FromSource("Microsoft"); + var isSystem = Matching.FromSource("System"); Log.Logger = new LoggerConfiguration() - .MinimumLevel.Information() - .WriteTo.Logger(l => l.Filter.ByIncludingOnly(isMicrosoftNamespace) - .WriteTo.Console(LogEventLevel.Warning)) + .MinimumLevel.Verbose() + .WriteTo.Logger(l => + l.WriteTo.Logger(l2 => l2 + .Filter.ByExcluding(v => isMicrosoftNamespace(v) || isSystem(v)) + .WriteTo.Console()) + ) .WriteTo.File(path: "Logs/log.log", rollingInterval: RollingInterval.Day) .CreateLogger();