Log what a sync pass is doing: INFO progress, DEBUG diagnosis, on stderr #5

Merged
HoroTW merged 1 commit from hakalya/fox-66-monitoring-logs into main 2026-10-12 13:13:20 +00:00 AGit
Collaborator

FOX-66. sync was silent during a first full scan. It now logs to stderr (stdout and --json unchanged): INFO = start line, scan start/end plus a line every 30 s with folders listed / entries seen / folders queued (no total, no percentage), download progress with a stall warning, one summary per pass that did something, one 'running, nothing to do' line per 15 min for idle passes. DEBUG = phases with durations, retries and waits, one line per downloaded file by item id, problems and events. --log-level or ICLOUD_DRIVE_LOG_LEVEL; journal priority prefixes under systemd. No credential, token, body or content reaches a log call; INFO names no drive entry; URLs are cut to their host. Tests: 166 pass (151 existing + 15 new in tests/test_log.py). Not run against the real service. 🤖 Generated with Claude Code

FOX-66. sync was silent during a first full scan. It now logs to stderr (stdout and --json unchanged): INFO = start line, scan start/end plus a line every 30 s with folders listed / entries seen / folders queued (no total, no percentage), download progress with a stall warning, one summary per pass that did something, one 'running, nothing to do' line per 15 min for idle passes. DEBUG = phases with durations, retries and waits, one line per downloaded file by item id, problems and events. --log-level or ICLOUD_DRIVE_LOG_LEVEL; journal priority prefixes under systemd. No credential, token, body or content reaches a log call; INFO names no drive entry; URLs are cut to their host. Tests: 166 pass (151 existing + 15 new in tests/test_log.py). Not run against the real service. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A first full scan of a large drive said nothing until it ended, and the
index stayed empty until then. sync now writes log lines to stderr
(standard logging; stdout and --json are unchanged):

- INFO: one start line, start/end of a complete-listing scan and a line
  every 30 s with what is known (folders listed, entries seen, folders
  queued; no total, no percentage), downloads with files fetched, failed
  and bytes received, a warning when no file finished and no byte arrived
  since the last report, one summary per pass that did something, and one
  "running, nothing to do" line per 15 minutes for idle passes.
- DEBUG: every phase with its duration, retries and waits, one line per
  downloaded file (item id, size, time), problems and events.
- --log-level / ICLOUD_DRIVE_LOG_LEVEL; journal priority prefixes when
  stderr is the systemd journal stream.

No credential, token, body or content is passed to a log call; INFO names
no entry of the drive, and every URL in a line is cut down to its host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HoroTW merged commit 6743448207 into main 2026-10-12 13:13:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
HoroTW/icloud-drive-linux!5
No description provided.