Nlog: Application Insights Target in NLog 5 for ASP.NET Core 2?

Created on 1 Jul 2017  路  12Comments  路  Source: NLog/NLog

NLog version: 5
.NET Core 2

Will there be an Application Insights target with NLog 5 and with the release of ASP.NET Core 2?

My current customer likes NLog and also Application Insights. They would like to control the configuration and logging of information to Application Insights via the NLog config file (and of course logging to other targets).

The production release for the app is not until next year, so we can wait if required. We're currently logging directly to Application Insights via the Application Insights API.

feature up-for-grabs

Most helpful comment

All 12 comments

It would be great to have, but it's currently not on the roadmap.

I main reason: I don't use Azure so I can't test it.

A PR with this target (and unit tests) would be great.

It looks like Microsoft already has an Application Insights target, but I don't know if it will work with NLog 5. Maybe they will publish an update?

This shouldn't be the responsibility of this repository. If it is, then in fairness I'll submit a pr for exceptionless.

@c0shea Microsoft.ApplicationInsights.NLogTarget only supports .Net Full Framework. It doesn't support .Net Core.

Created PR with NLog ver. 4.5.0 - https://github.com/Microsoft/ApplicationInsights-dotnet-logging/pull/167 (For ver. 2.6.0)

@snakefoot Can you provide an example of how to configure the Application Insights target in Core 2?

@erik-johnson Well the PR has just been accepted, so you probably have to beg for them to release ver. 2.6.0-beta3:

https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/

Microsoft.ApplicationInsights.NLogTarget ver. 2.6.0-beta3 has been released:

https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/2.6.0-beta3

Is there an example on how to integrate this ApplicationInsights target?

Thanks

as there is a package for this (https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/), I think it's OK to close this issue.

@snakefoot thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geedsen picture geedsen  路  3Comments

ErcinDedeoglu picture ErcinDedeoglu  路  3Comments

ranjan-2209 picture ranjan-2209  路  3Comments

BobSeu picture BobSeu  路  3Comments

smeegoan picture smeegoan  路  3Comments