log: use prefix [ERR] instead of [ERROR]

This commit is contained in:
Frank Schroeder 2017-06-08 09:50:47 +02:00
parent 536915fa9a
commit d98f0f7bab
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
2 changed files with 4 additions and 4 deletions

View File

@ -1806,7 +1806,7 @@ func (a *Agent) loadCheckState(check *structs.HealthCheck) error {
// Decode the state data
var p persistedCheckState
if err := json.Unmarshal(buf, &p); err != nil {
a.logger.Printf("[ERROR] agent: failed decoding check state: %s", err)
a.logger.Printf("[ERR] agent: failed decoding check state: %s", err)
return a.purgeCheckState(check.CheckID)
}

View File

@ -27,19 +27,19 @@ func (a *Agent) retryJoin() {
case ec2Enabled:
servers, err = cfg.discoverEc2Hosts(a.logger)
if err != nil {
a.logger.Printf("[ERROR] agent: Unable to query EC2 instances: %s", err)
a.logger.Printf("[ERR] agent: Unable to query EC2 instances: %s", err)
}
a.logger.Printf("[INFO] agent: Discovered %d servers from EC2", len(servers))
case gceEnabled:
servers, err = cfg.discoverGCEHosts(a.logger)
if err != nil {
a.logger.Printf("[ERROR] agent: Unable to query GCE instances: %s", err)
a.logger.Printf("[ERR] agent: Unable to query GCE instances: %s", err)
}
a.logger.Printf("[INFO] agent: Discovered %d servers from GCE", len(servers))
case azureEnabled:
servers, err = cfg.discoverAzureHosts(a.logger)
if err != nil {
a.logger.Printf("[ERROR] agent: Unable to query Azure instances: %s", err)
a.logger.Printf("[ERR] agent: Unable to query Azure instances: %s", err)
}
a.logger.Printf("[INFO] agent: Discovered %d servers from Azure", len(servers))
}