From 913a974eca2522ba7c6d27066481bb2c6635db53 Mon Sep 17 00:00:00 2001 From: Bernhard Guillon Date: Mon, 6 Jul 2026 22:16:37 +0200 Subject: Add log level system and sync logging - log.go: log level system (DEBUG, INFO, WARN, ERROR, NONE) - CLI: -log-level flag (default info), -verbose as shorthand for debug - Watcher: logs sync/remove actions at INFO level - Watcher: logs events at DEBUG level - Errors: structured error messages (DISK FULL, PERMISSION DENIED, etc.) - Updated README with -log-level flag --- errors_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'errors_test.go') diff --git a/errors_test.go b/errors_test.go index 553939d..e35e5b3 100644 --- a/errors_test.go +++ b/errors_test.go @@ -101,19 +101,19 @@ func TestIsRetryable(t *testing.T) { } func TestLogError_DiskFull(t *testing.T) { - logError("copy", "test.txt", syscall.ENOSPC) + logSyncError("copy", "test.txt", syscall.ENOSPC) } func TestLogError_PermissionDenied(t *testing.T) { - logError("write", "test.txt", syscall.EACCES) + logSyncError("write", "test.txt", syscall.EACCES) } func TestLogError_NotExist(t *testing.T) { - logError("stat", "test.txt", fs.ErrNotExist) + logSyncError("stat", "test.txt", fs.ErrNotExist) } func TestLogError_Nil(t *testing.T) { - logError("test", "file.txt", nil) + logSyncError("test", "file.txt", nil) } func TestSyncError(t *testing.T) { -- cgit v1.2.3