date heure pour le fichiers log et max retry corrigé

This commit is contained in:
sky
2025-09-14 05:59:39 +02:00
parent b99c80def4
commit 5954ea9401
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
#!/bin/bash
echo "Démarrage du bot Discord..."
LOG_FILE="/app/logs/$(date '+%Y%m%d_%H%M%S').log"
exec /app/venv/bin/python run-web.py 2>&1 | while IFS= read -r line; do
echo "$(date '+%Y-%m-%d %H:%M:%S%z') $line" | tee -a /app/logs/$(hostname).log # RFC 3339 / ISO 8601
echo "$(date '+%Y-%m-%d %H:%M:%S%z') $line" | tee -a "$LOG_FILE" # RFC 3339 / ISO 8601
done