log4net log all unhandled application errors

后端 未结 5 1999
悲哀的现实
悲哀的现实 2020-12-05 02:49

Can you point me to some tutorial or samples on how I can log all un-handled exceptions that are occurring on my mvc web app using log4net. Thank you

5条回答
  •  独厮守ぢ
    2020-12-05 02:58

    There is no built-in support for this in log4net. You should implement the Application_Error event in Global.asax and call your log4net logger there. The event will be triggered for all unhandled events in your app.

提交回复
热议问题