Missed something

This commit is contained in:
coletdjnz 2024-05-19 10:18:47 +12:00
parent 976cec10c9
commit 72bb0969bf
No known key found for this signature in database
GPG Key ID: 91984263BB39894A

View File

@ -142,7 +142,7 @@ def __init__(self, *args, **kwargs):
self.__logging_handlers = {} self.__logging_handlers = {}
for name in ('websockets.client', 'websockets.server'): for name in ('websockets.client', 'websockets.server'):
logger = logging.getLogger(name) logger = logging.getLogger(name)
handler = logging.StreamHandler(stream=sys.stdout) handler = WebsocketsLoggingHandler(logger=self._logger)
handler.setFormatter(logging.Formatter(f'{self.RH_NAME}: [{name}] %(message)s')) handler.setFormatter(logging.Formatter(f'{self.RH_NAME}: [{name}] %(message)s'))
self.__logging_handlers[name] = handler self.__logging_handlers[name] = handler
logger.addHandler(handler) logger.addHandler(handler)