Skip to content

Commit

Permalink
Print version number on startup, issue #104
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Aug 11, 2015
1 parent 9e2f8f6 commit 16c424d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ var fPidfile = flag.String("pidfile", "", "file to write our pid to")
var fPLuginsFilter = flag.String("filter", "", "filter the plugins to enable, separator is :")

// Telegraf version
var Version = "unreleased"

// Telegraf commit
var Commit = ""
var Version = "0.1.5-dev"

func main() {
flag.Parse()

if *fVersion {
fmt.Printf("InfluxDB Telegraf agent - Version %s\n", Version)
fmt.Printf("Telegraf - Version %s\n", Version)
return
}

Expand Down Expand Up @@ -101,7 +98,7 @@ func main() {
close(shutdown)
}()

log.Print("InfluxDB Agent running")
log.Printf("Starting Telegraf (version %s)\n", Version)
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
if ag.Debug {
log.Printf("Debug: enabled")
Expand Down

0 comments on commit 16c424d

Please sign in to comment.