Refactorisation utils

This commit is contained in:
Colin Maudry
2026-04-18 19:01:07 +02:00
parent e4e1438220
commit af3b3464e4
5 changed files with 126 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import logging
import os
logging.basicConfig(
format="%(asctime)s %(levelname)-8s %(message)s",
level=logging.INFO,
datefmt="%Y-%m-%d %H:%M:%S",
)
DEVELOPMENT = os.getenv("DEVELOPMENT", "False").lower() == "true"
logger = logging.getLogger("decp.info")
if DEVELOPMENT:
logger.setLevel(logging.DEBUG)
DOMAIN_NAME = (
"test.decp.info" if os.getenv("DEVELOPMENT").lower() == "true" else "decp.info"
)