feat: add synchronization statistics logging

- Initialize statistics logging in the mirror script
- Update logging to include total, processed, skipped, success, and failed repositories
- Enhance summary report with detailed statistics after synchronization

This commit introduces a comprehensive logging mechanism for the
repository synchronization process. It tracks various metrics such as
total repositories, processed repositories, and their success or failure
status. This enhancement provides better visibility into the
synchronization process and helps in debugging and monitoring.
This commit is contained in:
songtianlun
2025-01-03 17:26:32 +08:00
parent f7770955a9
commit ca6a80da97
3 changed files with 123 additions and 22 deletions

View File

@@ -27,4 +27,8 @@ SKIP_REPOS=${SKIP_REPOS:-"archive,AutoApiSecret, \
backup-openbilibili-go-common, \
carrot,ChatGLM-6B,dokploy,hub-mirror, \
Download-macOS, \
songtianlun,songtianlun.github.io"}
songtianlun,songtianlun.github.io"}
# 系统配置
LOG_FILE="$LOG_DIR/mirror-$(date '+%Y%m%d-%H%M%S').log"
STATS_FILE="$LOG_DIR/sync_stats-$(date '+%Y%m%d-%H%M%S').json"