Unable to configure NLog Logging in MVC 6 ASP vnext starter project

老子叫甜甜 提交于 2020-01-15 06:41:06

问题


Added to project.json file for logging:

"Microsoft.Framework.Logging.NLog":  "1.0.0-beta1"

The Framework.Logging.NLog depends internally upon NLog, which I tried installing via Nuget, project.json, Package console. It doesn't help.

Also wasn't able to find a way to configure NLog logging and a tutorial/guide to place the config sections of NLog.


回答1:


NLog does not ship for CoreClr hence you need to define the dependency under aspnet50. Do look at the sample https://github.com/aspnet/Logging/blob/dev/samples/SampleApp/project.json



来源:https://stackoverflow.com/questions/27858462/unable-to-configure-nlog-logging-in-mvc-6-asp-vnext-starter-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!