Clean up additional logging and always print basic agent config

This commit is contained in:
Cameron Sparr 2015-09-29 14:06:49 -07:00
parent f5d1aaf7d9
commit b01c28ebc6
2 changed files with 7 additions and 10 deletions

View File

@ -220,8 +220,8 @@ func (a *Agent) crankParallel() error {
}
elapsed := time.Since(start)
log.Printf("Cranking default interval, gathered %d metrics from %d plugins in %s\n",
len(bp.Points), counter, elapsed)
log.Printf("Cranking default (%s) interval, gathered %d metrics from %d plugins in %s\n",
a.Interval, len(bp.Points), counter, elapsed)
return a.flush(&bp)
}
@ -278,8 +278,8 @@ func (a *Agent) crankSeparate(shutdown chan struct{}, plugin *runningPlugin) err
}
elapsed := time.Since(start)
log.Printf("Cranking separate interval, gathered %d metrics from %s in %s\n",
len(bp.Points), plugin.name, elapsed)
log.Printf("Cranking separate (%s) interval, gathered %d metrics from %s in %s\n",
plugin.config.Interval, len(bp.Points), plugin.name, elapsed)
if err := a.flush(&bp); err != nil {
outerr = errors.New("Error encountered processing plugins & outputs")
}

View File

@ -132,12 +132,9 @@ func main() {
log.Printf("Starting Telegraf (version %s)\n", Version)
log.Printf("Loaded outputs: %s", strings.Join(outputs, " "))
log.Printf("Loaded plugins: %s", strings.Join(plugins, " "))
if ag.Debug {
log.Printf("Debug: enabled")
log.Printf("Agent Config: Interval:%s, Debug:%#v, Hostname:%#v, "+
"Precision:%#v, UTC: %#v\n",
ag.Interval, ag.Debug, ag.Hostname, ag.Precision, ag.UTC)
}
log.Printf("Tags enabled: %s", config.ListTags())
if *fPidfile != "" {