Be consistent in logging errors and use zap.Error
#1502
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1502
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Here and there, I see
zap.String("error", err.Error())
orzap.String("err", err.Error())
, and that makes me sadIIRC, the reason for that was that
zap.Error
printed a stacktrace, and we would like to be less verbose.No other problems.
@fyrchik So, should I close it?
According to the issue on github, initially the problem was with errors from the pkg/errors, which stored information about the stack inside: https://github.com/pkg/errors/blob/master/errors.go#L105
Errors from stdlib do not store the stack trace, so I agree that it is possible to replace all
zap.String("error", err.Error())
calls withzap.Error(err)