veyron/services/mgmt/binary/binaryd: minor changes to printing sever's name/ep.
Change-Id: Ib97bd2c37a57deb09759ae569550158e51671262
diff --git a/services/mgmt/binary/binaryd/main.go b/services/mgmt/binary/binaryd/main.go
index d67f1a7..9b87655 100644
--- a/services/mgmt/binary/binaryd/main.go
+++ b/services/mgmt/binary/binaryd/main.go
@@ -8,6 +8,7 @@
"os"
"path/filepath"
+ "veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/vlog"
@@ -26,7 +27,7 @@
var (
name = flag.String("name", "", "name to mount the binary repository as")
root = flag.String("root", "", "root directory for the binary repository")
- httpAddr = flag.String("http", ":0", "TCP address on which the HTTP server runs")
+ httpAddr = flag.String("http", ":0", "TCP address on which the HTTP server runs")
)
// toIPPort tries to swap in the 'best' accessible IP for the host part of the
@@ -121,7 +122,12 @@
vlog.Errorf("ServeDispatcher(%v) failed: %v", *name, err)
return
}
- vlog.Infof("Binary repository running at endpoint=%q", endpoint)
+ epName := naming.JoinAddressName(endpoint.String(), "")
+ if *name != "" {
+ vlog.Infof("Binary repository serving at %q (%q)", *name, epName)
+ } else {
+ vlog.Infof("Binary repository serving at %q", epName)
+ }
// Wait until shutdown.
<-signals.ShutdownOnSignals()
}