C#C
C#3y ago
M B V R K

✅ Why Serilog don't log errors???

Hi guys,
I'm trying to logging using Serilog, the logging targeting
File
,
Everything works fine, but when I log error it not logged,

In my program.cs the registration of Serilog I did as the following:
// Configure Serilog
Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Debug()
    .MinimumLevel.Override("Microsoft", LogEventLevel.Debug)
    .Enrich.FromLogContext()
    .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Day)
    .CreateLogger();


Please any help to fix this issue, and massive thanks in advance <3
Was this page helpful?