Redirect HTTP and Gin server logs into a file (xds-server-verbose.log).
[src/xds/xds-server.git] / lib / syncthing / st.go
index 10210a4..b622970 100644 (file)
@@ -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 {