Print running version and commit in log

pull/1716/head
Philip O'Toole 2015-02-24 09:47:07 -08:00
parent 6e4b91b351
commit a00c3d1a60
2 changed files with 7 additions and 0 deletions

View File

@ -37,6 +37,11 @@ const (
func main() {
log.SetFlags(0)
// If commit not set, make that clear.
if commit == "" {
commit = "unknown"
}
// Shift binary name off argument list.
args := os.Args[1:]

View File

@ -23,6 +23,8 @@ import (
)
func Run(config *Config, join, version string, logWriter *os.File) (*messaging.Broker, *influxdb.Server) {
log.Printf("influxdb started, version %s, commit %s", version, commit)
// Parse the configuration and determine if a broker and/or server exist.
configExists := config != nil
if config == nil {