-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nlog does not log Trace events in asp.net core 2 #238
Comments
Use configureLogging and builder.SetMinimumLevel() PS on mobile now |
Program.cs should be extended to include
See also https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?tabs=aspnetcore2x |
This works with AddNLog (ASP.NET Core 1 style), but not with UseNLog (see ##234) - any idea? |
No idea. Just copy pasting random information :). Not developing ASP NET Applications. |
Hopefully that doesn't mean WinForms ;) |
@304NotModified @snakefoot thanks! |
No just backend developer on various data-processing engines. |
@snakefoot you sir, are awesome. I would have never guessed that in a million years. Thank you. Removing config from appsettings.json and setting minimum level worked for me. |
Hi guys, It looks like this is still a problem in .NET Core 3.1. |
Please create new issue instead of waking up old issues with your random problems. Remember to fill out the template with details about how you setup NLog
|
@paulostradioti checked https://github.com/NLog/NLog.Web/wiki/Missing-trace%5Cdebug-logs-in-ASP.NET-Core-3%3F ? And indeed, if it still an issue, please open a new github issue, thanks! |
NLog.Web.AspNetCore 4.5.0-beta04, asp.net core 2.0.3
The code: https://gist.github.com/xumix/3cfb305dfd0f3cb743f9f25908212e4e
I add in Startup.cs
If I change
logger.LogInformation(requestLog);
tologger.LogTrace(requestLog);
then no logging occurs, even if I add minlevel="Trace"The text was updated successfully, but these errors were encountered: