From 454e8fa5b0914e1b71e4c32191d589447a384d30 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Thu, 27 Mar 2025 07:21:11 -0500 Subject: [PATCH] reduce watcher log redundancy --- core/watchers/api.go | 2 +- moonshark.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/watchers/api.go b/core/watchers/api.go index d0d5150..cbf5283 100644 --- a/core/watchers/api.go +++ b/core/watchers/api.go @@ -39,7 +39,7 @@ func WatchDirectory(config DirectoryWatcherConfig, manager *WatcherManager) (*Wa manager: manager, } - config.Log.Info("Started watching directory: %s", config.Dir) + config.Log.Debug("Started watching directory: %s", config.Dir) return w, nil } diff --git a/moonshark.go b/moonshark.go index a8072a0..a572edb 100644 --- a/moonshark.go +++ b/moonshark.go @@ -81,7 +81,6 @@ func setupWatchers(luaRouter *routers.LuaRouter, staticRouter *routers.StaticRou log.Warning("Failed to watch routes directory: %v", err) } else { 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) } else { cleanupFuncs = append(cleanupFuncs, staticWatcher.Close) - log.Info("File watcher active for static files") } } @@ -158,7 +156,7 @@ func main() { // Get library directories var libDirs []string libDirsConfig := cfg.GetStringArray("lib_dirs") - if libDirsConfig != nil && len(libDirsConfig) > 0 { + if len(libDirsConfig) > 0 { libDirs = libDirsConfig } else { // Default lib directory