feat: add configurable loglevel

This commit is contained in:
2026-04-22 22:29:58 +02:00
parent d6df67b643
commit f796ea229f
7 changed files with 38 additions and 17 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ func databaseGather(db *gorm.DB) (map[string]File, error) {
}
func watchdog(env utility.Environment, db *gorm.DB) {
slog.Info("performing the watchdog cycle")
slog.Debug("performing the watchdog cycle")
fsSet, err := filesystemGather(env)
if err != nil {
@@ -102,7 +102,7 @@ func watchdog(env utility.Environment, db *gorm.DB) {
case "strict":
err := utility.RemoveFile(fp)
if err != nil {
slog.Warn("failed to remove local file from the filesystem", "error", err)
slog.Error("failed to remove local file from the filesystem", "error", err)
}
case "dry":
slog.Debug("dry mode enabled, not purging", "filepath", fp)