Log4Net smtp appender only send email when error with full log(debug & info & error). Only when the application ends

前端 未结 3 1216
耶瑟儿~
耶瑟儿~ 2021-02-08 18:59

I am trying to configure a smtp appender in the log4net.config file that I have. The problem is that I have looked all over the internet and cannot find how to send an email whe

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 19:28

    change treshold to Error. Also log 4net only sends the email when the app is clodes.you can send it earlier. but than you first need to copy it ( because the org file is still in use) and than you can email the copy.

提交回复
热议问题