reduce watcher log redundancy

This commit is contained in:
Sky Johnson 2025-03-27 07:21:11 -05:00
parent 50e92ccf04
commit 454e8fa5b0
2 changed files with 2 additions and 4 deletions

View File

@ -39,7 +39,7 @@ func WatchDirectory(config DirectoryWatcherConfig, manager *WatcherManager) (*Wa
manager: manager, manager: manager,
} }
config.Log.Info("Started watching directory: %s", config.Dir) config.Log.Debug("Started watching directory: %s", config.Dir)
return w, nil return w, nil
} }

View File

@ -81,7 +81,6 @@ func setupWatchers(luaRouter *routers.LuaRouter, staticRouter *routers.StaticRou
log.Warning("Failed to watch routes directory: %v", err) log.Warning("Failed to watch routes directory: %v", err)
} else { } else {
cleanupFuncs = append(cleanupFuncs, luaRouterWatcher.Close) cleanupFuncs = append(cleanupFuncs, luaRouterWatcher.Close)
log.Info("File watcher active for Lua routes")
} }
} }
@ -92,7 +91,6 @@ func setupWatchers(luaRouter *routers.LuaRouter, staticRouter *routers.StaticRou
log.Warning("Failed to watch static directory: %v", err) log.Warning("Failed to watch static directory: %v", err)
} else { } else {
cleanupFuncs = append(cleanupFuncs, staticWatcher.Close) cleanupFuncs = append(cleanupFuncs, staticWatcher.Close)
log.Info("File watcher active for static files")
} }
} }
@ -158,7 +156,7 @@ func main() {
// Get library directories // Get library directories
var libDirs []string var libDirs []string
libDirsConfig := cfg.GetStringArray("lib_dirs") libDirsConfig := cfg.GetStringArray("lib_dirs")
if libDirsConfig != nil && len(libDirsConfig) > 0 { if len(libDirsConfig) > 0 {
libDirs = libDirsConfig libDirs = libDirsConfig
} else { } else {
// Default lib directory // Default lib directory