NLog exceptions as Trace in Application Insights

爱⌒轻易说出口 提交于 2019-12-23 13:27:21

问题


Hi I want to log exceptions to Application Insights using NLog. I integrated both my project and application insights. The real problem here is NLog has different logger types such as warn, info, error, debug, fatal. When I am trying to log using these in app insights I get all these exceptions as Trace errors. Please find in the below screen shot. I want them to be there name as per the severity.


回答1:


The Trace Telemetry has a property called 'Severity', see also the docs so the severity is logged correctly.

According to your screenshot everything is right, i see Error Info, Info and Debug so what is wrong?

The yellow part is just the type of telemetry (Trace) and has nothing to do with the severity.



来源:https://stackoverflow.com/questions/46294427/nlog-exceptions-as-trace-in-application-insights

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