Skip to content

Figure out a way to allow configuring SignalR settings on the client. #6887

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

Closed
danroth27 opened this issue Jan 20, 2019 · 8 comments
Closed
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed

Comments

@danroth27
Copy link
Member

danroth27 commented Jan 20, 2019

The current SignalR connection on the client is set up to print info logs, but this isn't required in the general case. However it would be useful to retain the ability to configure the log level among other things, in the event the user's attempting to debug connection issues on the client.


Original issue report

When running a Razor Components app you see the following log output in the browser console.

Information: Normalizing '_blazor' to 'http://localhost:58443/_blazor'. - components.server.js:16 
Information: WebSocket connected to ws://localhost:58443/_blazor?id=EQLp2HObPNphy4UacPN7Jw - components.server.js:16 
Information: Using HubProtocol 'messagepack'.

We should investigate why we are logging Information level messages by default and how a user would change the log level.

@davidfowl
Copy link
Member

It’s coming from SignalR @BrennanConroy

@sven5
Copy link

sven5 commented Jan 21, 2019

How to change the log level?

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 23, 2019
@stsrki
Copy link
Contributor

stsrki commented Feb 5, 2019

I'm trying to update my components libraries to the new RC 3.0 preview. When I start the app it does not show. The only thing that I get are this messages in the console

Information: Normalizing '_blazor' to 'http://localhost:8211/_blazor'.
content.js:5 --------init----------- http://localhost:8211/
components.server.js:16 Information: WebSocket connected to ws://localhost:8211/_blazor?id=LzFpPrbHiuZQl2XwAKZbVg
components.server.js:16 Information: Using HubProtocol 'messagepack'.

I really don't see what is wrong, basically I have updated all my project files according to the default Razor Components app. Can you guys point what can I do?

@sven5
Copy link

sven5 commented Feb 5, 2019

@stsrki
Have you already looked at the output of ASP.NET Core Web Server in Visual Studio? Or run with the debugger in Visual Studio (just hit F5).

@stsrki
Copy link
Contributor

stsrki commented Feb 5, 2019

I'm just starting it without debugging(CTRL+F5). There is nothing unusual in the output window.

I just saw this in the blog post

In this preview release ASP.NET Core Razor Components don't yet support using static assets in component libraries, so the support for component class libraries is pretty limited. However, in a future preview we expect to add this support for using static assets from a library just like you can in Blazor today.

Could be the reason why it's not working as I have some js and css files in the component library projects.

@danroth27 danroth27 added the area-blazor Includes: Blazor, Razor Components label Feb 6, 2019
@mkArtakMSFT
Copy link
Member

@BrennanConroy can you please share details regarding how to control this? Also, we'd like to disable the default to not have these logs by default.

@mkArtakMSFT mkArtakMSFT added bug This issue describes a behavior which is not expected - a bug. 1 - Ready labels Mar 12, 2019
@mkArtakMSFT mkArtakMSFT added this to the 3.0.0-preview6 milestone Mar 12, 2019
@BrennanConroy
Copy link
Member

https://docs.microsoft.com/en-us/aspnet/core/signalr/configuration?view=aspnetcore-2.2&tabs=dotnet#configure-logging
I don't know how razor components handles things but they can just pass a different log level in.

@sven5
Copy link

sven5 commented Mar 13, 2019

In Razor Components, the client connection is established here:https://github.com/aspnet/AspNetCore/blob/33839dc66a9e6eb730e22e7b6d9d381bcf7b4779/src/Components/Browser.JS/src/Boot.Server.ts#L44-L49
There should be a way to control the client log level from outside, i.e. in the options of RazorComponentsApplicationBuilderExtensions

@pranavkm pranavkm changed the title Investigate why Information level logging is visible in the browser by default in the Razor Components template Figure out a way to allow configuring signalR settings on the client. Mar 13, 2019
@pranavkm pranavkm changed the title Figure out a way to allow configuring signalR settings on the client. Figure out a way to allow configuring SignalR settings on the client. Mar 13, 2019
rynowak added a commit that referenced this issue Mar 29, 2019
This commit will eventually fix #6887 and #6887 and #5624

I've done just about the simplest thing so far, I thought I would stop
and get feedback on the general pattern before we move forward.
@rynowak rynowak assigned rynowak and unassigned BrennanConroy Mar 29, 2019
rynowak pushed a commit that referenced this issue Mar 29, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
rynowak pushed a commit that referenced this issue Apr 1, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
rynowak pushed a commit that referenced this issue Apr 2, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
rynowak pushed a commit that referenced this issue Apr 2, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
rynowak pushed a commit that referenced this issue Apr 2, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
rynowak pushed a commit that referenced this issue Apr 2, 2019
Fixes: #6887 and #6887 and #5624

Adds support for calling Blazor.start({...}) and passing in a
configuration object.

For now all you can configure is the SignalR HubConnectionBuilder. This
is a priority right now because we want to make configuring SignalR's
logging accessible.
@rynowak rynowak added Done This issue has been fixed and removed 1 - Ready labels Apr 2, 2019
@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Projects
None yet
Development

No branches or pull requests

8 participants