fix output formatting

This commit is contained in:
yusing
2024-03-13 17:41:10 +00:00
parent a0f890fed7
commit e14eeb914f
5 changed files with 6 additions and 6 deletions

View File

@@ -62,16 +62,16 @@ func (p *Provider) grWatchFileChanges() {
}
switch {
case event.Has(fsnotify.Write):
p.Logf("Watcher", "file change detected", p.name)
p.Logf("Watcher", "file change detected")
p.StopAllRoutes()
p.BuildStartRoutes()
case event.Has(fsnotify.Remove), event.Has(fsnotify.Rename):
p.Logf("Watcher", "file renamed / deleted", p.name)
p.Logf("Watcher", "file renamed / deleted")
p.StopAllRoutes()
}
case err := <-watcher.Errors:
time.Sleep(100 * time.Millisecond)
p.Errorf("Watcher", "File watcher error: %s", p.name, err)
p.Errorf("Watcher", "File watcher error: %s", err)
}
}
}