Print version number on startup, issue #104
This commit is contained in:
parent
9e2f8f664b
commit
16c424de2a
|
@ -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 :")
|
var fPLuginsFilter = flag.String("filter", "", "filter the plugins to enable, separator is :")
|
||||||
|
|
||||||
// Telegraf version
|
// Telegraf version
|
||||||
var Version = "unreleased"
|
var Version = "0.1.5-dev"
|
||||||
|
|
||||||
// Telegraf commit
|
|
||||||
var Commit = ""
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if *fVersion {
|
if *fVersion {
|
||||||
fmt.Printf("InfluxDB Telegraf agent - Version %s\n", Version)
|
fmt.Printf("Telegraf - Version %s\n", Version)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +98,7 @@ func main() {
|
||||||
close(shutdown)
|
close(shutdown)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
log.Print("InfluxDB Agent running")
|
log.Printf("Starting Telegraf (version %s)\n", Version)
|
||||||
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
|
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
|
||||||
if ag.Debug {
|
if ag.Debug {
|
||||||
log.Printf("Debug: enabled")
|
log.Printf("Debug: enabled")
|
||||||
|
|
Loading…
Reference in New Issue