Ajoute date et heure dans log

This commit is contained in:
sky
2025-09-14 03:48:21 +02:00
parent daecbe1b18
commit b55c779d43

View File

@@ -1,4 +1,6 @@
#!/bin/bash
echo "Démarrage du bot Discord..."
exec /app/venv/bin/python run-web.py 2>&1 | tee >(rotatelogs /app/logs/app.log.%Y%m%d-%H%M%S 50M)
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
done