I get following INFO & WARNING messages
connection open
Websocket timed out waiting for pong
How to prevent it from logging them?
I get following INFO & WARNING messages
connection open
Websocket timed out waiting for pong
How to prevent it from logging them?
sanic: 23.6.0
websockets: 12.0
Any insight, plz
The logging of WebSockets is too verbose, especially so in debug mode. It is an issue that will be addressed when this PR is merged to Sanic: Logging improvements by Tronic · Pull Request #2852 · sanic-org/sanic · GitHub
Meanwhile, you should be able to suppress the messages by importing logger from sanic.log and setting the log level on that to logging.WARNING or higher. However, choosing where to set this is tricky because the setting gets overridden at some point on server startup. Note that the PR adds a separate websockets_logger such that you can still receive info/debug messages from Sanic itself.