summaryrefslogtreecommitdiffstats
path: root/pkg/gui/file_watching.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-09-26 10:23:10 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-09-26 11:00:50 +1000
commit077f11361805417c15234c62a9f9aa022f913d43 (patch)
tree2cf25beba4f96b55392f09d733a14c25c149de07 /pkg/gui/file_watching.go
parent0c6cbe7746660155df0645f01d37150099d21f49 (diff)
add in-built logging support for a better dev experience
Diffstat (limited to 'pkg/gui/file_watching.go')
-rw-r--r--pkg/gui/file_watching.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/gui/file_watching.go b/pkg/gui/file_watching.go
index 7e5e20a76..81a0c97fc 100644
--- a/pkg/gui/file_watching.go
+++ b/pkg/gui/file_watching.go
@@ -59,15 +59,14 @@ func (w *fileWatcher) popOldestFilename() {
w.WatchedFilenames = w.WatchedFilenames[1:]
if err := w.Watcher.Remove(oldestFilename); err != nil {
// swallowing errors here because it doesn't really matter if we can't unwatch a file
- w.Log.Warn(err)
+ w.Log.Error(err)
}
}
func (w *fileWatcher) watchFilename(filename string) {
- w.Log.Warn(filename)
if err := w.Watcher.Add(filename); err != nil {
// swallowing errors here because it doesn't really matter if we can't watch a file
- w.Log.Warn(err)
+ w.Log.Error(err)
}
// assume we're watching it now to be safe
@@ -138,7 +137,7 @@ func (gui *Gui) watchFilesForChanges() {
// watch for errors
case err := <-gui.fileWatcher.Watcher.Errors:
if err != nil {
- gui.Log.Warn(err)
+ gui.Log.Error(err)
}
}
}