From 347bd1674bbf67ccb6209951a4bf8f2971715532 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Thu, 24 Aug 2017 21:23:40 +0200 Subject: Redirect HTTP and Gin server logs into a file (xds-server-verbose.log). Signed-off-by: Sebastien Douheret --- lib/syncthing/st.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/syncthing') diff --git a/lib/syncthing/st.go b/lib/syncthing/st.go index 10210a4..b622970 100644 --- a/lib/syncthing/st.go +++ b/lib/syncthing/st.go @@ -317,7 +317,10 @@ func (s *SyncThing) Connect() error { return fmt.Errorf("ERROR: cannot connect to Syncthing (null client)") } - s.client.SetLogger(s.log) + // Redirect HTTP log into a file + s.client.SetLogLevel(s.conf.Log.Level.String()) + s.client.LoggerPrefix = "SYNCTHING: " + s.client.LoggerOut = s.conf.LogVerboseOut s.MyID, err = s.IDGet() if err != nil { -- cgit 1.2.3-korg