Where to store web service exceptions?

I am working on creating a web service (using C #) and this web service will use the MS SQL Server database. Now I am trying to create (exception logging log) for this web service. I just want to save every exception in the web service for future use (error tracing).

Where is the best place to keep these exceptions? Is it a good idea to store it in a database? What if the exception is related to the database itself?

+3
source share
2 answers

You have 3 options:

  • - , , . AppName\YYYY\MM\DD\yourfile.log, , ( ). Threading . . , , , .

  • - , . . , , , ? - .. , .

  • - 1 2 . , , Windows ( , Windows) . , , . , , , , .

1 2. , , . , , . , , , , , .

, , , . DB, . , . , . , , - .

+6

. db, .. .

, , db? , . . ( ), , .

+2

Source: https://habr.com/ru/post/1745823/