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

How do I disable log output?

Open 9854626 opened this issue 2 years ago • 1 comments

How can I turn off the log output? I do not want to output these trace logs all the time. What should I do

9854626 avatar Apr 11 '23 07:04 9854626

Hey, sorry for the late response, I plan to migrate to Microsoft.Extensions.Logging, but it should be doable even in the current setup. It depends on the logging library, for example, for Serilog, it is possible to filter out by context, e.g. in appsettings.json:

"Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": {
        "System": "Information",
        "Microsoft": "Information",
        "Websocket.Client": "Warning"
      }
    }
  }

Working example

Marfusios avatar Aug 05 '23 16:08 Marfusios