-
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
UseNLog() in 4.5.0-beta01 removes ConsoleLogger from .Net Core #199
Comments
Have you check this. We don't remove any logger. Probably the issue is the custom log factory |
Thanks again for reporting! |
When using GetCurrentClassLogger() then one is no longer using Microsoft Extension Logging, but writing directly to the NLog-engine, maybe this is the confusing part? |
I found the issue (but not yet how to solve) in asp.net 2 we register NLogLoggerFactory, instead of NLogLoggerProvider. - this will replaces Microsoft's loggerFactory. This is a more clean way, but the side-effect is that addConsole is not working and that loggers that were register on (Microsoft's) loggerFactory are gone. |
So config made before UseNLog is still applied and Microsoft's addConsole is also working fixes NLog#199
fixed in beta 2 |
So config made before UseNLog is still applied and Microsoft's addConsole is also working fixes NLog/NLog.Web#199
After updating from NLog.Web.AspNetCore 4.3.1 to 4.5.0-beta01, the ConsoleLogger from .NET does no longer work.
"CreateDefaultBuilder" adds the ConsoleLogger by default, but after i am adding "UseNlog" no messages are logged to console any more.
Does Nlog Registration remove the Loggers already registered?
Maybe this issue is related? "Add option to remove other loggers #192"
This is my Nlog Setup, created as descriped in https://github.com/NLog/NLog.Web/wiki/Getting-started-with-ASP.NET-Core-2
The text was updated successfully, but these errors were encountered: