simple_server: Fix init of websockets log handler

This has changed since the original code was written:
https://websockets.readthedocs.io/en/stable/cheatsheet.html#debugging
This commit is contained in:
Nirbheek Chauhan 2020-05-25 18:29:53 +00:00 committed by Matthew Waters
parent 78df1ca74c
commit b8c1bd1fa3

View file

@ -261,9 +261,9 @@ class WebRTCSimpleServer(object):
# https://websockets.readthedocs.io/en/stable/api.html#websockets.protocol.WebSocketCommonProtocol # https://websockets.readthedocs.io/en/stable/api.html#websockets.protocol.WebSocketCommonProtocol
max_queue=16) max_queue=16)
logger = logging.getLogger('websockets.server') # Setup logging
logger = logging.getLogger('websockets')
logger.setLevel(logging.ERROR) logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler()) logger.addHandler(logging.StreamHandler())
return wsd return wsd