Home > Net >  The.net core 3.1 efcore NLog, how the SQL record to the Log file?
The.net core 3.1 efcore NLog, how the SQL record to the Log file?

Time:10-24

Environment: the.net 3.1 webapi core + efcore + NLog
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
  • Related