Feb 21, 2019 07:05 AM|Yohann Lu|LINK
In my web API I would like to store exceptions. I can log exceptions to a file or insert into database. I wonder which way would be more appropriate or better solution? I would glad if you can guide me.
You need to choose your storage method according to the purpose of the log.
The following links may give you some ideas.
Logging and Exception handling, Versioning in ASP.NET WEB API
Request logging and Exception handling/logging in Web APIs using Action Filters, Exception Filters and NLog