microsoft / ApplicationInsights-Profiler-AspNetCore

Application Insights Profiler sample and documentation
MIT License
66 stars 24 forks source link

ANSI coloring of debug output #76

Closed Eneuman closed 4 years ago

Eneuman commented 4 years ago

Reading the debug output of ServiceProfiler is hard because it's using ANSI coloring. Visual Studio 2019 does not support ANSI coloring in debug window so the output looks like this:

dbug: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0] Entering StartServiceProfilerAsync. dbug: ServiceProfiler.EventPipe.Client.ServiceProfilerProvider[0] Trace: /tmp/4e918aef-39ec-472c-a237-18bb17b14df9.netperf

Since many packages are using ANSI coloring today, the best solution would be to make VS support it, but they for some reason does not see this as a issue.

Is there a way to enable/disable ANSI coloring from debug output?

pharring commented 4 years ago

The Console Logger has a ConsoleLoggerOptions.DisableColors property. You should set it to 'true' in your configuration (appsettings.json)

xiaomi7732 commented 4 years ago

@Eneuman I just want to follow up a bit since it has been days. Does the answer from @pharring solves your issue?

Eneuman commented 4 years ago

Yes it did! Thanks @pharring

Really hope the VS team can fix colouring in the window. VS Code already got it.


Från: Saar Shen notifications@github.com Skickat: Tuesday, February 18, 2020 8:01:50 PM Till: microsoft/ApplicationInsights-Profiler-AspNetCore ApplicationInsights-Profiler-AspNetCore@noreply.github.com Kopia: Per Bornsjö per.bornsjo@links.se; Mention mention@noreply.github.com Ämne: Re: [microsoft/ApplicationInsights-Profiler-AspNetCore] ANSI coloring of debug output (#76)

@Eneumanhttps://github.com/Eneuman I just want to follow up a bit since it has been days. Does the answer from @pharringhttps://github.com/pharring solves your issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/ApplicationInsights-Profiler-AspNetCore/issues/76?email_source=notifications&email_token=AC4J5TOYNCT6ATSCJEPAYWTRDQWB5A5CNFSM4KUOMI4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMDRKAY#issuecomment-587666691, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC4J5TL3VHR3MTX7UXX6XWLRDQWB5ANCNFSM4KUOMI4A.