stats_hook: log normal shutdown condition as debug, not error (#8028)

The `stats_hook` writes an Error log every time an allocation becomes
terminal. This is a normal condition, not an error. A real error
condition like a failure to collect the stats is logged later. It just
creates log noise, and this is a particularly bad operator experience
for heavy batch workloads.
This commit is contained in:
Tim Gross
2020-05-20 10:28:30 -04:00
committed by GitHub
parent c2dd6f9dba
commit db4c88f71b

View File

@@ -137,7 +137,7 @@ MAIN:
// check if the error is terminal otherwise it's likely a
// transport error and we should retry
if re, ok := err.(*structs.RecoverableError); ok && re.IsUnrecoverable() {
h.logger.Error("failed to start stats collection for task with unrecoverable error", "error", err)
h.logger.Debug("failed to start stats collection for task with unrecoverable error", "error", err)
return nil, err
}