Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change log level to error for merge failures #324

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

nathan-artie
Copy link
Contributor

No description provided.

@nathan-artie nathan-artie requested a review from Tang8330 February 8, 2024 04:33
@nathan-artie nathan-artie marked this pull request as ready for review February 8, 2024 04:33
@@ -90,7 +90,7 @@ func Flush(ctx context.Context, inMemDB *models.DatabaseData, dest destination.B

if err != nil {
tags["what"] = "merge_fail"
slog.With(logFields...).Warn(fmt.Sprintf("Failed to execute %s...not going to flush memory", action), slog.Any("err", err))
slog.Error(fmt.Sprintf("Failed to execute %s...not going to flush memory", action), append(logFields, slog.Any("err", err))...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does append work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, any reason not to just change .Warn to .Error?

slog.With(logFields...).Error(fmt.Sprintf("Failed to execute %s...not going to flush memory", action), slog.Any("err", err))

Copy link
Contributor Author

@nathan-artie nathan-artie Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can just do the simple level change for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know

@nathan-artie nathan-artie merged commit 8e5ef89 into master Feb 8, 2024
1 check passed
@nathan-artie nathan-artie deleted the nv/change-warn-to-error branch February 8, 2024 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants