Test : Intégration bouton PayPal Sandbox et activation du Serveur Mail
Build and Push Docker Image / build-and-push (push) Successful in 1m45s

This commit is contained in:
xavier committed 2026-08-23 09:47:14 +02:00
1 parent 632c23069a
commit 2ea18701b5
12 files changed
+486 -187

No files matched your search

+1 -12
View File
@@ -3,7 +3,6 @@ import logging
from logging.handlers import TimedRotatingFileHandler
from datetime import datetime
# Chemin absolu obligatoire pour correspondre au volume Docker
LOG_DIR = "/DATA/AppData/MULTI-IA-AETHAS38"
os.makedirs(LOG_DIR, exist_ok=True)
LOG_FILE = os.path.join(LOG_DIR, "aethas_logs.txt")
@@ -12,7 +11,6 @@ logger = logging.getLogger("Aethas38")
logger.setLevel(logging.INFO)
if not logger.handlers:
# Conservation 365 jours pour conformité légale
handler = TimedRotatingFileHandler(LOG_FILE, when="midnight", interval=1, backupCount=365, encoding="utf-8")
handler.suffix = "%Y-%m-%d"
formatter = logging.Formatter('[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
@@ -21,17 +19,8 @@ if not logger.handlers:
def log_event(niveau, source, message):
msg_formate = f"[{source}] {message}"
if niveau.upper() == "INFO": logger.info(msg_formate)
elif niveau.upper() == "WARNING": logger.warning(msg_formate)
elif niveau.upper() == "ERROR": logger.error(msg_formate)
elif niveau.upper() == "CRITICAL": logger.critical(msg_formate)
print(f"[{datetime.now().strftime('%H:%M:%S')}] [{niveau}] {msg_formate}")
if niveau in ["ERROR", "CRITICAL"]:
try:
from modules.debug_mailer import envoyer_alerte_debug
envoyer_alerte_debug(niveau, source, message)
except Exception:
pass
print(f"[{datetime.now().strftime('%H:%M:%S')}] [{niveau}] {msg_formate}")