aboutsummaryrefslogtreecommitdiffstats
path: root/errors_test.go
diff options
context:
space:
mode:
authorBernhard Guillon <Bernhard.Guillon@begu.org>2026-07-06 22:16:37 +0200
committerBernhard Guillon <Bernhard.Guillon@begu.org>2026-07-06 22:16:37 +0200
commit913a974eca2522ba7c6d27066481bb2c6635db53 (patch)
treef0cfc1ee173a762662b586fca5db9db422592093 /errors_test.go
parent5f2ba9c3d37a1c8658aea411188a6763e982b1ab (diff)
downloadsourcewatch-913a974eca2522ba7c6d27066481bb2c6635db53.tar.gz
sourcewatch-913a974eca2522ba7c6d27066481bb2c6635db53.zip
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
Diffstat (limited to 'errors_test.go')
-rw-r--r--errors_test.go8
1 files changed, 4 insertions, 4 deletions
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) {