Skip to content

Commit

Permalink
cmd/syncthing: Improve logged device information on startup (#5321)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsodin committed Nov 22, 2018
1 parent 2f9840d commit 0391c57
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/syncthing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,11 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
pprof.StartCPUProfile(f)
}

myDev, _ := cfg.Device(myID)
l.Infof(`My name is "%v"`, myDev.Name)
for _, device := range cfg.Devices() {
if len(device.Name) > 0 {
l.Infof("Device %s is %q at %v", device.DeviceID, device.Name, device.Addresses)
if device.DeviceID != myID {
l.Infof(`Device %s is "%v" at %v`, device.DeviceID, device.Name, device.Addresses)
}
}

Expand Down

0 comments on commit 0391c57

Please sign in to comment.