简体   繁体   English

如何在ASP.NET Web API中收集跟踪信息?

[英]How do I collect Tracing information in ASP.NET Web API?

I'm trying to log every request for my WEB API. 我正在尝试记录我的WEB API的每个请求。 I followed the instruction in the link below to have tracing information in my output. 我按照下面链接中的说明在输出中有跟踪信息。 I wonder what will be a good way to collect those information? 我想知道收集这些信息的好方法是什么? For example, I want to store the information into a file. 例如,我想将信息存储到文件中。

https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api

For my part, I use an ETW for tracing information, it is a very powerful component of Microsoft that provides multiple sink that you can use to store your event, whether in a file or a database . 就我而言,我使用ETW来跟踪信息,它是Microsoft的一个非常强大的组件,它提供了多个接收器,可用于存储事件,无论是在文件还是数据库中。 Documentation : https://docs.microsoft.com/en-us/windows/desktop/etw/about-event-tracing 文档: https//docs.microsoft.com/en-us/windows/desktop/etw/about-event-tracing

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

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