websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

Logger initializing error in Blazor WebAssembly

Open k-karuna opened this issue 2 years ago • 2 comments

I receive

[WEBSOCKET] Failed to initialize logger, disabling.. Error: System.NullReferenceException: Object reference not set to an instance of an object. blazor.webassembly.js:1 at Websocket.Client.Logging.LogProvider.GetCurrentClassLogger () blazor.webassembly.js:1 at Websocket.Client.WebsocketClient.GetLogger ()

k-karuna avatar Aug 30 '21 13:08 k-karuna

Hi @k-karuna ,

thanks for reporting this. We should definitely migrate from LibLog (since it is deprecated) into something else. Here is already a PR that migrates to Microsoft.Extensions.Logging, unfortunately, it is breaking change and cannot be merged right away. I still believe we can find some other way how to make it break-less and keep the client-side simple (so they don't have to worry about logging).

Marfusios avatar Aug 30 '21 14:08 Marfusios

Working on it

Marfusios avatar Sep 06 '23 11:09 Marfusios