Sometimes we are logging errors using a separate tag, like:
logger.Error("Something happened!", "err", err)
And sometimes we are using a format string, e.g.:
logger.Errorf("Something happened: %w", err)
I'd say the tag one seems better (my vote), and that's what we've been trying to follow, but either way we need to chose one standard and refactor the usages. Should be quick, just some manual work.
Sometimes we are logging errors using a separate tag, like:
And sometimes we are using a format string, e.g.:
I'd say the tag one seems better (my vote), and that's what we've been trying to follow, but either way we need to chose one standard and refactor the usages. Should be quick, just some manual work.