From 1340e543276d232b82bd313c434c327f7d3e18e0 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Sun, 6 Dec 2015 17:15:55 +0000 Subject: [PATCH] Only print 'Enabled/Disabled debug data for ...' if it was enabled/disabled --- cmd/syncthing/gui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 4f617f6bb..6f9dc6189 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -398,14 +398,14 @@ func (s *apiSvc) postSystemDebug(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") q := r.URL.Query() for _, f := range strings.Split(q.Get("enable"), ",") { - if f == "" { + if f == "" || l.ShouldDebug(f) { continue } l.SetDebug(f, true) l.Infof("Enabled debug data for %q", f) } for _, f := range strings.Split(q.Get("disable"), ",") { - if f == "" { + if f == "" || !l.ShouldDebug(f) { continue } l.SetDebug(f, false)