From 55ae744ffa2a1f0ed5958ae8763885ca26f2b192 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Wed, 11 Dec 2024 22:24:12 +0000 Subject: [PATCH] Only enable debugging when DEBUG is set --- nancy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nancy/__init__.py b/nancy/__init__.py index 7274626..30e19bc 100644 --- a/nancy/__init__.py +++ b/nancy/__init__.py @@ -18,7 +18,8 @@ from .warnings_util import simple_warning, die -logging.basicConfig(level=logging.DEBUG) +if "DEBUG" in os.environ: + logging.basicConfig(level=logging.DEBUG) VERSION = importlib.metadata.version("nancy")