chore(log): Refine debug messages for config reloads

This commit is contained in:
hkfires
2025-09-28 08:40:25 +08:00
parent 1dbb930660
commit aa25820698
2 changed files with 4 additions and 3 deletions

View File

@@ -456,6 +456,7 @@ func (w *Watcher) handleEvent(event fsnotify.Event) {
// reloadConfig reloads the configuration and triggers a full reload
func (w *Watcher) reloadConfig() bool {
log.Debug("=========================== CONFIG RELOAD ============================")
log.Debugf("starting config reload from: %s", w.configPath)
newConfig, errLoadConfig := config.LoadConfig(w.configPath)
@@ -555,7 +556,7 @@ func (w *Watcher) reloadConfig() bool {
// reloadClients performs a full scan and reload of all clients.
func (w *Watcher) reloadClients(rescanAuth bool) {
log.Debugf("starting full client reload process")
log.Debugf("starting full client load process")
w.clientsMutex.RLock()
cfg := w.config
@@ -578,7 +579,7 @@ func (w *Watcher) reloadClients(rescanAuth bool) {
if rescanAuth {
// Load file-based clients when explicitly requested (startup or authDir change)
authFileCount = w.loadFileClients(cfg)
log.Debugf("loaded %d new file-based clients", authFileCount)
log.Debugf("loaded %d file-based clients", authFileCount)
} else {
// Preserve existing auth hashes and only report current known count to avoid redundant scans.
w.clientsMutex.RLock()