add logger

This commit is contained in:
2023-01-31 20:57:07 +01:00
parent 249a85539d
commit 99cd3768e4
3 changed files with 14 additions and 9 deletions

9
app.py
View File

@@ -1,10 +1,16 @@
import asyncio
import websockets
import json
import logging
import websockets
clients = {}
vars = {}
logging.basicConfig(
format="%(asctime)s %(message)s",
level=logging.INFO,
)
async def handshake(ws,data):
project_id = data.get('project_id','')
user = data.get('user')
@@ -31,7 +37,6 @@ async def set_variable(project_id,var):
async def disconnect(project_id,ws):
print(f"disconnecting {ws.host}:{ws.port}")
clients.get(project_id,[]).remove(ws)
async def handler(ws, path):
project_id = ""