c# log4net not logging line number of exception

倾然丶 夕夏残阳落幕 提交于 2020-01-06 08:05:16

问题


In my local code base, my log file logs the exact line number where the exception took place. However, my boss just sent me a log file from a client, and I don't see a single line number in the log. Is there a setting I am missing to log the line number for a deployed application?


回答1:


If you want line numbers in your logged stack trace you have to deploy the matching .pdb files. Even then the line numbers might not match the source code if you compiled with Optimize code enabled (recommended for prod builds).



来源:https://stackoverflow.com/questions/52844076/c-sharp-log4net-not-logging-line-number-of-exception

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!