Add Datacenter to output

This commit is contained in:
Armon Dadgar 2013-12-24 12:22:50 -08:00
parent ac15ca1139
commit b3e7bced05
2 changed files with 11 additions and 9 deletions

View file

@ -165,11 +165,12 @@ func (c *Command) Run(args []string) int {
}
c.Ui.Output("Consul agent running!")
c.Ui.Info(fmt.Sprintf("Node name: '%s'", config.NodeName))
c.Ui.Info(fmt.Sprintf(" RPC addr: '%s'", config.RPCAddr))
c.Ui.Info(fmt.Sprintf("HTTP addr: '%s'", config.HTTPAddr))
c.Ui.Info(fmt.Sprintf("Encrypted: %#v", config.EncryptKey != ""))
c.Ui.Info(fmt.Sprintf(" Server: %v", config.Server))
c.Ui.Info(fmt.Sprintf(" Node name: '%s'", config.NodeName))
c.Ui.Info(fmt.Sprintf("Datacenter: '%s'", config.Datacenter))
c.Ui.Info(fmt.Sprintf(" RPC addr: '%s'", config.RPCAddr))
c.Ui.Info(fmt.Sprintf(" HTTP addr: '%s'", config.HTTPAddr))
c.Ui.Info(fmt.Sprintf(" Encrypted: %#v", config.EncryptKey != ""))
c.Ui.Info(fmt.Sprintf(" Server: %v", config.Server))
// Enable log streaming
c.Ui.Info("")

View file

@ -74,10 +74,11 @@ type Config struct {
// DefaultConfig is used to return a sane default configuration
func DefaultConfig() *Config {
return &Config{
HTTPAddr: "127.0.0.1:8500",
LogLevel: "INFO",
RPCAddr: "127.0.0.1:8400",
Server: false,
Datacenter: consul.DefaultDC,
HTTPAddr: "127.0.0.1:8500",
LogLevel: "INFO",
RPCAddr: "127.0.0.1:8400",
Server: false,
}
}