From 990f6e2aacbbb6869259390d973fde30fac13501 Mon Sep 17 00:00:00 2001 From: Bernhard Guillon Date: Mon, 6 Jul 2026 22:03:47 +0200 Subject: Add progress logging for initial sync - Log start of sync with source directory - Print progress every 1000 files during sync - Log completion with stats (files, dirs, skipped, errors) and elapsed time - Print 'watcher: ready' when monitoring begins - Exit cleanly on dry-run --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 24135f5..077aec2 100644 --- a/main.go +++ b/main.go @@ -32,6 +32,13 @@ func main() { log.Fatalf("initial sync failed: %v", err) } + if *dryRun { + log.Println("dry-run complete, exiting") + return + } + + log.Println("watcher: ready, monitoring for changes ...") + ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) defer cancel() -- cgit v1.2.3