logging exception in c#

前端 未结 6 1323
轮回少年
轮回少年 2020-12-29 04:52

logging exception the code below allows to save the content of an exception in a text file. Here I\'m getting only the decription of the error.

6条回答
  •  执笔经年
    2020-12-29 05:44

    I am only answering for the ask, other people have already mentioned about the code already. If you want the line number to be included in your log you need to include the generated debug files (pdb) in your deployment to the server. If its just your Dev/Test region that is fine but I don't recommend using in production.

提交回复
热议问题