-
Notifications
You must be signed in to change notification settings - Fork 165
Missing trace\debug logs in ASP.NET Core 2?
Rolf Kristensen edited this page Mar 3, 2022
·
6 revisions
Missing the trace and debug logs in .NET Core 2?
Check your appsettings.json
The following is advised:
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Information"
}
}
}
appsettings.json
. Ex. appsettings.development.json
Notice NLog.Web.AspNetCore ver. 4.12 introduces the new options ReplaceLoggerFactory
and RemoveLoggerFactoryFilter
for NLogAspNetCoreOptions
. This allows NLog to be excluded from any filtering configured for Microsoft LoggerFactory. Example:
.UseNLog(new NLogAspNetCoreOptions() { RemoveLoggerFactoryFilter = true });
For general docs, check https://github.com/NLog/NLog/wiki