Clean up logging (#3161)

- use `Err` method instead of format strings
- use `Msg` if no format string is used
This commit is contained in:
qwerty287
2024-01-10 20:57:12 +01:00
committed by GitHub
parent 12c40eb957
commit 00df53e941
20 changed files with 47 additions and 47 deletions

View File

@@ -78,7 +78,7 @@ func (q *persistentQueue) Poll(c context.Context, agentID int64, f FilterFn) (*m
if task != nil {
log.Debug().Msgf("pull queue item: %s: remove from backup", task.ID)
if derr := q.store.TaskDelete(task.ID); derr != nil {
log.Error().Msgf("pull queue item: %s: failed to remove from backup: %s", task.ID, derr)
log.Error().Err(derr).Msgf("pull queue item: %s: failed to remove from backup", task.ID)
} else {
log.Debug().Msgf("pull queue item: %s: successfully removed from backup", task.ID)
}