Files
Socket/log_cleanup.sh
T
testadmin a180fe8385 feat: complete logging audit - fill all gaps
- Filter noisy audio play() errors from frontend log
- Add logging to ALL 8 ToBet services (was only Baccarat)
- Add InitTableService logging (Sumday/Boot/NumberTab creation & failure)
- Add logview.sh for quick log viewing
- Add log_cleanup.sh for 30-day rotation
2026-05-14 11:49:36 +08:00

7 lines
302 B
Bash

#!/bin/bash
# OG 日志清理 - 删除30天前的日志文件
LOG_DIR="/www/wwwroot/Socket/runtime/log"
find "$LOG_DIR" -name "*.log" -type f -mtime +30 -delete 2>/dev/null
find "$LOG_DIR" -type d -empty -delete 2>/dev/null
echo "[$(date)] log cleanup done, current size: $(du -sh $LOG_DIR | cut -f1)"