Fixed xds-common version and use last one
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 24 Aug 2017 22:21:26 +0000 (00:21 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 24 Aug 2017 22:21:54 +0000 (00:21 +0200)
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
glide.yaml
lib/syncthing/st.go
main.go

index 3661d8f..652e51c 100644 (file)
@@ -22,5 +22,6 @@ import:
 - package: github.com/satori/go.uuid
   version: ^1.1.0
 - package: github.com/iotbzh/xds-common
+  version: 4b8e35b6786b
   subpackages:
   - golib/common
index 53e4688..a750036 100644 (file)
@@ -300,7 +300,9 @@ func (s *SyncThing) Connect() error {
                return fmt.Errorf("ERROR: cannot connect to Syncthing (null client)")
        }
 
-       s.client.SetLogger(s.log)
+       s.client.SetLogLevel(s.log.Level.String())
+       s.client.LoggerPrefix = "SYNCTHING: "
+       s.client.LoggerOut = s.log.Out
 
        return nil
 }
diff --git a/main.go b/main.go
index d3722e2..32083bb 100644 (file)
--- a/main.go
+++ b/main.go
@@ -72,7 +72,7 @@ func xdsAgent(cliCtx *cli.Context) error {
                if err := ctx.SThg.Connect(); err == nil {
                        break
                }
-               ctx.Log.Infof("Establishing connection to Syncthing (retry %d/%d", retry, maxRetry)
+               ctx.Log.Infof("Establishing connection to Syncthing (retry %d/%d)", retry, maxRetry)
                time.Sleep(time.Second)
                retry--
        }