fix: fix log spam related to skipping custom nice scores (#10206)

This commit is contained in:
Jon Ayers
2023-10-11 02:32:50 -05:00
committed by GitHub
parent 7c71053eab
commit 4452a1484d

View File

@ -1290,11 +1290,7 @@ func (a *agent) manageProcessPriority(ctx context.Context) ([]*agentproc.Process
// Getpriority actually returns priority for the nice value
// which is niceness + 20, so here 20 = a niceness of 0 (aka unset).
if score != 20 {
if score != niceness {
logger.Debug(ctx, "skipping process due to custom niceness",
slog.F("niceness", score),
)
}
// We don't log here since it can get spammy
continue
}