Skip to content

Commit

Permalink
Fixed log position
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Dec 2, 2021
1 parent 227d12c commit 51aef21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func handler(filename string, reload bool, h http.Handler) http.Handler {
}

func mdHandler(filename string) http.Handler {
logInfo("Watching %s for changes", filename)
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
markdown := slurp(filename)
Expand Down
2 changes: 2 additions & 0 deletions cmd/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ func wsWriter(ws *websocket.Conn, filename string) {
ticker.Stop()
}()

logInfo("Watching %s for changes", filename)

watcher, err := fsnotify.NewWatcher()
if err != nil {
log.Fatalf("Error:%v", err)
Expand Down

0 comments on commit 51aef21

Please sign in to comment.