Print version number on startup, issue #104

This commit is contained in:
Cameron Sparr 2015-08-11 14:22:46 -06:00
parent 9e2f8f664b
commit 16c424de2a
1 changed files with 3 additions and 6 deletions

View File

@ -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
}
@ -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")