This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
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
Description
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 join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels