Merge pull request #1842 from hashicorp/f-version-and-id

Print the version and client node ID
This commit is contained in:
Alex Dadgar
2016-10-24 10:13:33 -07:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -257,6 +257,7 @@ func NewClient(cfg *config.Config, consulSyncer *consul.Syncer, logger *log.Logg
// Start collecting stats
go c.collectHostStats()
c.logger.Printf("[INFO] client: Node ID %q", c.Node().ID)
return c, nil
}

View File

@@ -446,6 +446,7 @@ func (c *Command) Run(args []string) int {
// Compile agent information for output later
info := make(map[string]string)
info["version"] = fmt.Sprintf("%s%s", config.Version, config.VersionPrerelease)
info["client"] = strconv.FormatBool(config.Client.Enabled)
info["log level"] = config.LogLevel
info["server"] = strconv.FormatBool(config.Server.Enabled)