AspNetCore.Docs/aspnetcore/signalr/diagnostics/net-client-console-log.cs

12 lines
313 B
C#

var connection = new HubConnectionBuilder()
.WithUrl("https://example.com/my/hub/url")
.ConfigureLogging(logging =>
{
// Log to the Console
logging.AddConsole();
// This will set ALL logging to Debug level
logging.SetMinimumLevel(LogLevel.Debug);
})
.Build();