Does log4net support including the call stack in a log message

后端 未结 4 1821
故里飘歌
故里飘歌 2020-12-06 07:09

I wish to include the call stack (e.g. the methods that called me) in a log4net message. Is there a standard way of doing this?

(I know this will be slow, but I onl

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 07:34

    If you are catching exceptions, then just log Exception.ToString(), as that will contain the full stack trace, and will be available as the normal log message.

提交回复
热议问题