开发者

Is NLog work with customErrors?

开发者 https://www.devze.com 2023-01-13 19:43 出处:网络
when i use <customErrors mode=\"Off\"/> and i have an error on the scre开发者_开发技巧en it writes to log file but when i use <customErrors mode=\"RemoteOnly\"/> then i see my custom error

when i use <customErrors mode="Off"/> and i have an error on the scre开发者_开发技巧en it writes to log file but when i use <customErrors mode="RemoteOnly"/> then i see my custom error page but error not catches but logger :-/


I think this depends on how you are capturing the error from NLog if you are only capturing undhandled exceptions then NLog would not work in this case because the all exceptions that are not explicitly handled will be assigned the custom errors exception handler.

Thus since they are being handled NLog won't log them.

0

精彩评论

暂无评论...
验证码 换一张
取 消