Skip to content

Commit

Permalink
cmd/syncthing/generate: Log DeviceId to stdout instead of stderr (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mina committed Nov 18, 2022
1 parent 8cca9df commit b3da072
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/syncthing/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ import (
"github.com/syncthing/syncthing/lib/osutil"
"github.com/syncthing/syncthing/lib/protocol"
"github.com/syncthing/syncthing/lib/syncthing"
"github.com/syncthing/syncthing/lib/logger"
)

var (
l = logger.DefaultLogger.NewFacility("app", "Main run facility")
)

type CLI struct {
Expand Down Expand Up @@ -88,8 +93,7 @@ func Generate(confDir, guiUser, guiPassword string, noDefaultFolder, skipPortPro
}
}
myID = protocol.NewDeviceID(cert.Certificate[0])
log.Println("Device ID:", myID)

l.Infoln("Device ID:", myID)
cfgFile := locations.Get(locations.ConfigFile)
cfg, _, err := config.Load(cfgFile, myID, events.NoopLogger)
if fs.IsNotExist(err) {
Expand Down

0 comments on commit b3da072

Please sign in to comment.