Code:
1, citing NLog, NLog. Web. AspNetCore, NLog. Extensions. Logging
Reference code:
https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-3
2, the Startup. Reference code in the cs:
https://www.cnblogs.com/puzi0315/p/13488173.html
Results:
Is started in "CreateHostBuilder" function error: Unable to resolve the service for the type ILoggerFactory
NLog not bound to the ILoggerFactory is suspected, but didn't find a solution
Q: why use NLog?
A: the original project upgrade
CodePudding user response:
ILoggerFactory without injection