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

Add an option to turn off debug logging #378

Closed
jeffpapp opened this issue Apr 6, 2017 · 4 comments
Closed

Add an option to turn off debug logging #378

jeffpapp opened this issue Apr 6, 2017 · 4 comments
Labels

Comments

@jeffpapp
Copy link

jeffpapp commented Apr 6, 2017

I can't find a way to turn off debug logging which seems to be enabled by default.

I don't think it's very helpful to have a flood of Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Message" log messages on every request. It just makes it harder to see the actual log messages you'd want to see.

It looks like calling .UseApplicationInsights() in Program.cs automatically configures a debug logger with no way of disabling it.

@SergeyKanzhelev
Copy link
Contributor

You can debug trace like explained here: microsoft/ApplicationInsights-dotnet#310

Bigger issue is that disabling of output will stop Application Insights local search from working. @gardnerjr and @acearun had plans to make it work without the debug output, but I'm not sure when it will happen.

@SergeyKanzhelev
Copy link
Contributor

Closing. Please re-open if you need more info

@jeffpapp
Copy link
Author

jeffpapp commented Apr 6, 2017

Yep, that worked.

I was looking at https://github.com/Microsoft/ApplicationInsights-aspnetcore/blob/develop/src/Microsoft.ApplicationInsights.AspNetCore/Extensions/ApplicationInsightsServiceOptions.cs#L58 which I thought would have been able to turn it off.

It would still be nice to control that via some sort of options overload on .UseApplicationInsights() in the future.

@vaindil
Copy link

vaindil commented Oct 24, 2017

I'd like this option but for programs that aren't using AI at all. I don't have the VS extension installed and I'm not calling UseApplicationInsights(), yet my console is still full of those entries. Do I have to install the NuGet package just to disable them?

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

No branches or pull requests

3 participants