Skip to content

Fix logging config and output redirection in DebugProxy #22157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2020

Conversation

captainsafia
Copy link
Member

@captainsafia captainsafia commented May 22, 2020

  • Set base path to current directory for ConfigurationBuilder in DebugProxyHost
  • Redirect output from DebugProxy to console
  • Enable verbose and protocol logs in MonoProxy

Here's are examples of output from the DebugProxy when running the StandaloneApp with the following blazor-debugproxysettings.json in the project root.

{
  "Logging": {
    "LogLevel": {
      "Default": "Debug"
    }
  }
}

debug-proxy-host-log

debug-proxy-host

Addresses #22134

@ghost ghost added the area-blazor Includes: Blazor, Razor Components label May 22, 2020
@captainsafia captainsafia requested a review from a team May 22, 2020 19:33
Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

In the case of a hosted project, should the config go in the client project or the server one? I guess it’s the server because there could be any number of client projects but only one instance of the debugging middleware. Is that right?

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented May 22, 2020

Oh also, is it worth patching MonoProxy.cs to enable output for verbose log entries? We can get this fixed in the upstream repo (Mono) later but that may take longer than doing it ourselves in the aspnet repo.

@captainsafia
Copy link
Member Author

I guess it’s the server because there could be any number of client projects but only one instance of the debugging middleware. Is that right?

Yes, for a server project it would go under the root of MyProject.Server.

Oh also, is it worth patching MonoProxy.cs to enable output for verbose log entries? We can get this fixed in the upstream repo (Mono) later but that may take longer than doing it ourselves in the aspnet repo.

Done. I went ahead and enabled protocol logs as well.

@mkArtakMSFT
Copy link
Contributor

@pranavkm there seems to be some Pipeline Configuration Error here:

Pipeline configuration error:
Could not retrieve file content for /.azure/pipelines/helix-matrix.yml from repository self hosted on https://github.com/ using commit c426d2a0b5aa326ead307286ee3fce38e01f24e6. GitHub reported the error, "Internal Server Error"

Was there an intentional change to break this?

@pranavkm
Copy link
Contributor

Internal Server Error sounds like an issue with GitHub. We also haven't been using helix in the 3.1 / blazor-wasm branch.

@captainsafia
Copy link
Member Author

@pranavkm @mkArtakMSFT I think we can sensibly ignore this one. It showed up on Friday when GitHub was having a service degradation. That build doesn't seem to be a part of the checks that we do on blazor-wasm. I think it was incorrectly added while GitHub was being wonky and is stuck in that state now.

Are folks cool with merging this?

@pranavkm
Copy link
Contributor

Are folks cool with merging this?

Sure, let's get this in.

@captainsafia captainsafia merged commit 9b98da3 into blazor-wasm May 26, 2020
@captainsafia captainsafia deleted the safia/fix-dbg-proxy branch May 26, 2020 17:09
pranavkm pushed a commit that referenced this pull request May 27, 2020
* Fix logging config and output redirection in DebugProxy
* Log all messages from DebugProxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants