Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Debug trace logger should no-op if application manually adds the ApplicationTraceLoggerProvider itself #315

Closed
DamianEdwards opened this issue Jan 11, 2017 · 0 comments

Comments

@DamianEdwards
Copy link
Member

Currently, an application that wishes to use the ApplicationInsightsLoggerProvider to redirect log messages to Application Insights trace telemetry needs to disable the debug logger (via ApplicationInsightsOptions.EnableDebugLogger) or they'll end up with duplicate trace messages while debugging the application.

The logger added by ApplicationInsightsOptions.EnableDebugLogger should coordinate this itself to avoid duplicate messages rather than the application having to do it manually (maybe by using a marker TelemetryInitializer to detect when another logger instance has been added and in that case evaluate that instance's configured filter [stored on the marker] and no-op if the filter already applies).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant