From 05a8a7bd2eb8bc5c6ab36666ecfbcc5af91c6d1e Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 27 May 2024 15:25:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8A=20=E2=80=94=20Add=20level=20of=20l?= =?UTF-8?q?og=20before=20the=20log=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + argos/logging.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3321d21..7954f1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] - 💄📯 — Improve notifications and result(s) pages +- 🔊 — Add level of log before the log message ## 0.1.1 diff --git a/argos/logging.py b/argos/logging.py index 74de43c..071b003 100644 --- a/argos/logging.py +++ b/argos/logging.py @@ -2,6 +2,9 @@ import logging LOG_LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] +# Print level before message +logging.basicConfig(format="%(levelname)s: %(message)s") + # XXX We probably want different loggers for client and server. logger = logging.getLogger(__name__)