In my ASP.NET SignalR (.NET 7 WebApplication with Serilog), logs keep filling up with:
[INF] Request starting HTTP/1.1 POST http://127.0.0.1:5000/hubs/agentshub?id=su3OANTvP1YtU2i90eK1rA - 11
[INF] Request finished HTTP/1.1 POST http://127.0.0.1:5000/hubs/agentshub?id=su3OANTvP1YtU2i90eK1rA - 11 - 200 0 text/plain 1.1589ms
As there are no other messages from the hub before or after these messages, I assume these are simply SignalR internal pings. As seems to be evident from more verbose logging.
My question is how to filter out these ping messages while keeping other SignalR hub request messages?
I tried:
.MinimumLevel.Override("Microsoft.AspNetCore.SignalR", Serilog.Events.LogEventLevel.Debug)
.MinimumLevel.Override("Microsoft.AspNetCore.Http.Connections", Serilog.Events.LogEventLevel.Debug);
But no luck.