From 3483d1e70c121e83fd943dcd26354e44b5bf1b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Tue, 8 Feb 2022 18:43:48 +0100 Subject: [PATCH] fix(server): less verbose logging --- src/server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server.py b/src/server.py index 801bb10..7209561 100644 --- a/src/server.py +++ b/src/server.py @@ -21,7 +21,13 @@ from settings import ( ) from utils import User, Users -logging.basicConfig(level=logging.DEBUG) +logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(name)s %(levelname)-8s %(message)s", datefmt="(%F %T)") + +# disable all loggers from different files +logging.getLogger("asyncio").setLevel(logging.ERROR) +logging.getLogger("asyncio.coroutines").setLevel(logging.ERROR) +logging.getLogger("websockets.server").setLevel(logging.ERROR) +logging.getLogger("websockets.protocol").setLevel(logging.ERROR) r = redis.Redis(host=REDIS_HOST, port=REDIS_PORT, db=0) r.mset(KEYS_RESET)