"os/exec"
"github.com/Sirupsen/logrus"
- "github.com/iotbzh/xds-agent/lib/common"
"github.com/iotbzh/xds-agent/lib/xdsconfig"
+ common "github.com/iotbzh/xds-common/golib"
"github.com/syncthing/syncthing/lib/config"
)
env := []string{
"STNODEFAULTFOLDER=1",
"STNOUPGRADE=1",
- "STNORESTART=1",
}
// XXX - temporary hack because -gui-apikey seems to correctly handle by
time.Sleep(500 * time.Millisecond)
if common.Exists(stConfigFile) {
break
- }
+ }
}
if tmo <= 0 {
return nil, fmt.Errorf("Cannot start Syncthing for config file creation")
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
}