From b927113c77525a102e922e783f1f660e95f94a12 Mon Sep 17 00:00:00 2001 From: v00g100skr Date: Fri, 26 Jan 2024 23:07:10 +0200 Subject: [PATCH] logging --- deploy/websocket_server/websocket_server.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/deploy/websocket_server/websocket_server.py b/deploy/websocket_server/websocket_server.py index 0c7e2e9..f25f51c 100644 --- a/deploy/websocket_server/websocket_server.py +++ b/deploy/websocket_server/websocket_server.py @@ -6,7 +6,7 @@ from aiomcache import Client from functools import partial -debug_level = os.environ.get('DEBUG_LEVEL') or 'DEBUG' +debug_level = os.environ.get('DEBUG_LEVEL') or 'INFO' websocket_port = os.environ.get('WEBSOCKET_PORT') or 1234 logging.basicConfig(level=debug_level, @@ -88,7 +88,6 @@ def split_message(message): case 'district': logger.info(f"{client_ip}_{client_port}: {header} {data}") await websocket.send(f"district callback: {data}") - logger.info(f"{client_ip}_{client_port}: {header} {data}") case 'firmware': logger.info(f"{client_ip}_{client_port}: {header} {data}") client['software'] = data @@ -96,7 +95,6 @@ def split_message(message): logger.info(f"{client_ip}_{client_port}: {header} {data}") payload = '{"payload": "bins", "bins": %s}' % shared_data.bins await websocket.send(payload) - logger.info(f"{client_ip}_{client_port}: {header} {data}") case _: logger.info(f"{client_ip}_{client_port}: unknown data request") except websockets.exceptions.ConnectionClosedError as e: