简体   繁体   English

在Web API中启用日志

[英]Enabling logs in a Web API

I am new to the web development world and I would like to find a way to enable some sort of logs in my Web API project. 我是Web开发领域的新手,我想找到一种在我的Web API项目中启用某种日志的方法。 I think that it will beneficial specially if I need to check any problem the user has in the future. 我认为如果将来我需要检查用户遇到的任何问题,这将特别有益。 I am using Visual Studio 2012 我正在使用Visual Studio 2012

Thanks 谢谢

Take a look at ELMAH or log4net or Enterprise Library Logger . 看一下ELMAHlog4netEnterprise Library Logger An easy way to get your solution up and running with any of these is by using the Nuget Package Installer. 使用Nuget软件包安装程序,可以轻松启动并运行其中的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM