0

We have a Web API in MVC, C#. For logging, we are using log.net. The issue is sometimes API is skipping writing the logs inside Controller/Action. To trace the request we are using Begin Request, Pre-Request, Post Request, and End Request in global.asax. It writes the request most of the time but occasionally the application does not write logs in the controller/action that we mentioned inside the action or function. Also, we don't see any error in the log at the same time when logs are skipped. Please let me know if you have any suggestions.

  • This link will help you in debugging the root cause https://stackoverflow.com/a/2263359/6527049 – Vivek Nuna Oct 11 '21 at 17:06
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 13 '21 at 12:37
  • Web API is not writing the logs every time. It only writes the logs for the events inside Global.asax but skips the logs mentioned in Controller i.e inside Action or Functions without any error. – Ashish Bhadouria Oct 14 '21 at 14:31

0 Answers0