aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syncthing/st.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-24 21:23:40 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-24 21:28:28 +0200
commit347bd1674bbf67ccb6209951a4bf8f2971715532 (patch)
treeb34495fe40d7cf6c0d08a5b9a6b977b3981f9496 /lib/syncthing/st.go
parent2fed63ed0087df0c79f7f30f7f397611381bfccd (diff)
Redirect HTTP and Gin server logs into a file (xds-server-verbose.log).
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/syncthing/st.go')
-rw-r--r--lib/syncthing/st.go5
1 files changed, 4 insertions, 1 deletions
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 {