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

RHCLOUD-36895 | refactor: reduce logging noise #241

Conversation

MikelAlejoBR
Copy link
Member

What?

Puts the "Ignored OffsetCommitted" error messages under the "debug" log level.

Why?

The log messages about the ignored committed offsets are not really useful unless we are debugging problems with that. Therefore, we could simply leave an error log message for when the offset committing goes wrong, and a debug one when we really want to know that offsets are being committed.

Jira ticket

[RHCLOUD-36895]

The log messages about the ignored committed offsets are not really useful
unless we are debugging problems with that. Therefore, we could simply
leave an error log message for when the offset committing goes wrong, and
a debug one when we really want to know that offsets are being committed.

RHCLOUD-36895
Copy link
Contributor

@dehort dehort left a comment

Choose a reason for hiding this comment

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

Looking good! I left a couple of suggestions.

Thank you for digging into this!

break
}

l.Log.Debugf("Ignored OffsetsComitted: %#v", e)
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about making this a trace level log?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, even better. Done!

default:
l.Log.Infof("Ignored %v\n", e)
l.Log.Infof("Ignored %#v\n", e)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a bit more context to this log message? Maybe something like "Ignored kafka event"? I was a bit stumped the first time I saw the original log message. It took me a minute to figure out what I was seeing getting logged.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's a good idea too! Done!

Copy link
Contributor

@dehort dehort left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@dehort dehort merged commit f061d57 into RedHatInsights:master Dec 13, 2024
10 of 11 checks passed
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