dotnet / dotnet/aspnetcore

Custom Logging in SignalR DefaultHubDispatcher

Open
#30,956 8 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is your feature request related to a problem? Please describe.
I'd like to log binding-errors and method not found errors in a SignalR-Hub as errors or warning. Currently they are logged as debug. So i have no chance on the server-side to detect, if an api is calling invalid methods. Except enabling debug-logging for "Microsoft.AspNetCore.SignalR".

In Version 1.1 the DefaultHubDispatcher was public, so it was possible to override and replace it. With .net 5 the Dispatcher is now internal and it is no longer possible to override it.
Further on i found no possibilty to inject a custom logging logic. Do i miss something?

### Describe the solution you'd like
The easiest and fastest way would be to set DefaultHubDispatcher back to public. A maybe better fix would be to allow a custom error handling.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.