Use zap.Error
for logging errors #1559
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1559
Loading…
Reference in a new issue
No description provided.
Delete branch "a-savchuk/frostfs-node:patch-zap-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #1502
Use
zap.Error
instead ofzap.String
for logging errors: change all expressions likezap.String("error", err.Error())
orzap.String("err", err.Error())
tozap.Error(err)
. Leave similar expressions with other messages unchanged, for example,zap.String("last_error", lastErr.Error())
orzap.String("reason", ctx.Err().Error())
.This change was made by applying the following patch:
zap.Error
for logging errorsVery nice
Why the cases with
.String
? I do not see lines like this in the PR and these values do not implementerror
in general.74d9bb0e05
tob2749b1ed9
b2749b1ed9
to2e7f98b09b
Fixed
Also, an identifier is an expression, so no need to have a separate case for it.
Fixed
2e7f98b09b
tof0c43c8d80