问题
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