Skip to content

Commit

Permalink
fix(watcher): raise log level for watch events
Browse files Browse the repository at this point in the history
This avoids spamming logs at the debug log levels, since we now listen
for many events and only later filter them out.

Closes #1100.
  • Loading branch information
edvald committed Sep 3, 2019
1 parent fb7383c commit 14eb4ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions garden-service/src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,22 +284,22 @@ export class Watcher {

private makeFileChangedHandler() {
return (path: string) => {
this.log.debug(`Watcher: File ${path} modified`)
this.log.silly(`Watcher: File ${path} modified`)
this.sourcesChanged([{ type: "file", path, change: "changed" }])
}
}

private makeDirAddedHandler() {
return (path: string) => {
this.buffer[path] = { type: "dir", path, change: "added" }
this.log.debug(`Watcher: Directory ${path} added to buffer`)
this.log.silly(`Watcher: Directory ${path} added to buffer`)
}
}

private makeDirRemovedHandler() {
return (path: string) => {
this.buffer[path] = { type: "dir", path, change: "removed" }
this.log.debug(`Watcher: Directory ${path} removed`)
this.log.silly(`Watcher: Directory ${path} removed`)
}
}

Expand Down

0 comments on commit 14eb4ea

Please sign in to comment.