node: Possibly incorrect log level is used #1547

Open
opened 2024-12-09 09:45:36 +00:00 by a-savchuk · 2 comments
Member

I believe these messages should have Error level instead of Info

if err != nil {
c.log.Info(ctx, logs.FrostFSNodeFailedToCreateNeoRPCClient,
zap.Any("endpoints", addresses),
zap.String("error", err.Error()),
)


if err := cli.SetGroupSignerScope(); err != nil {
c.log.Info(ctx, logs.FrostFSNodeFailedToSetGroupSignerScopeContinueWithGlobal, zap.Error(err))
}

Describe the solution you'd like

Use Error log level instead of Info

Describe alternatives you've considered

Leave as is if the log level was chosen intentionally

## Is your feature request related to a problem? Please describe. I believe these messages should have `Error` level instead of `Info` https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/7e542906ef9085a792e5ec5f7185bfdd9acecedb/cmd/frostfs-node/morph.go#L96-L100 https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/7e542906ef9085a792e5ec5f7185bfdd9acecedb/cmd/frostfs-node/morph.go#L110-L112 ## Describe the solution you'd like Use `Error` log level instead of `Info` ## Describe alternatives you've considered Leave as is if the log level was chosen intentionally
a-savchuk added the
frostfs-node
good first issue
triage
observability
internal
labels 2024-12-09 09:45:36 +00:00
Author
Member

Maybe the second one should have Warn because it doesn't fail on an error

Maybe the second one should have `Warn` because it doesn't fail on an error
fyrchik changed title from cmd/node: Possibly incorrect log level used to node: Possibly incorrect log level used 2024-12-09 12:19:21 +00:00
fyrchik changed title from node: Possibly incorrect log level used to node: Possibly incorrect log level is used 2024-12-09 12:19:31 +00:00
Owner

In the first case fatalOnErr should already print something, but it uses log package.
We should not print the same error twice.

In the first case `fatalOnErr` should already print something, but it uses `log` package. We should not print the same error twice.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1547
No description provided.