temptours+tours

This commit is contained in:
2025-12-09 11:27:02 -05:00
commit f28439c9bb
49 changed files with 18416 additions and 0 deletions

21
engine/logger.py Normal file
View File

@ -0,0 +1,21 @@
import sys
# ENGINE_MODE = "DEV" ou "PROD"
ENGINE_MODE = "DEV" # change à PROD sur ton serveur
def log_debug(msg: str):
if ENGINE_MODE == "DEV":
print(f"[DEBUG] {msg}")
def log_info(msg: str):
if ENGINE_MODE == "DEV":
print(f"[INFO] {msg}")
def log_warn(msg: str):
# On affiche les warnings en DEV mais pas en PROD
if ENGINE_MODE == "DEV":
print(f"[WARN] {msg}")
def log_error(msg: str):
# Toujours afficher les erreurs, même en production
print(f"[ERROR] {msg}", file=sys.stderr)