From 3ef19411f98173619e331effe0a6684ff55aa408 Mon Sep 17 00:00:00 2001 From: Peter Marquardt Date: Sat, 14 Apr 2018 10:46:33 +0200 Subject: [PATCH] cmd/syncthing: Remove spurious in debug output Remove spurious gui.go:985: DEBUG: on successful call time.Parse() in getSystemLog and getSystemLogTxt. --- cmd/syncthing/gui.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index f6adf9544..0adca93c8 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -982,7 +982,9 @@ func (s *apiService) postSystemErrorClear(w http.ResponseWriter, r *http.Request func (s *apiService) getSystemLog(w http.ResponseWriter, r *http.Request) { q := r.URL.Query() since, err := time.Parse(time.RFC3339, q.Get("since")) - l.Debugln(err) + if err != nil { + l.Debugln(err) + } sendJSON(w, map[string][]logger.Line{ "messages": s.systemLog.Since(since), }) @@ -991,7 +993,9 @@ func (s *apiService) getSystemLog(w http.ResponseWriter, r *http.Request) { func (s *apiService) getSystemLogTxt(w http.ResponseWriter, r *http.Request) { q := r.URL.Query() since, err := time.Parse(time.RFC3339, q.Get("since")) - l.Debugln(err) + if err != nil { + l.Debugln(err) + } w.Header().Set("Content-Type", "text/plain; charset=utf-8") for _, line := range s.systemLog.Since(since) {