Public Access
MAJ Globale : Chemins absolus (NAS), Model Updater auto, Timeout 90s OpenRouter, Pop-up et traçabilité financière
Build and Push Docker Image / build-and-push (push) Successful in 1m48s
Build and Push Docker Image / build-and-push (push) Successful in 1m48s
This commit is contained in:
1 parent
b4ed2947d4
commit
632c23069a
9 files changed
+66
-89
No files matched your search
+4
-3
@@ -1,8 +1,9 @@
|
||||
import os
|
||||
import logging
|
||||
from logging.handlers import TimedRotatingFileHandler
|
||||
import os
|
||||
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")
|
||||
@@ -11,7 +12,7 @@ logger = logging.getLogger("Aethas38")
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
if not logger.handlers:
|
||||
# Conformité LCEN : Conservation des logs de connexion sur 365 jours (1 an)
|
||||
# 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')
|
||||
@@ -32,5 +33,5 @@ def log_event(niveau, source, message):
|
||||
try:
|
||||
from modules.debug_mailer import envoyer_alerte_debug
|
||||
envoyer_alerte_debug(niveau, source, message)
|
||||
except Exception as mail_error:
|
||||
except Exception:
|
||||
pass
|
||||
Reference in new issue
Block a user