Skip to content

data: silence annoying debug log messages #676

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

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

willfindlay
Copy link
Contributor

The "Data message received" and "Data message used" log messages flood the Tetragon logs when debug logging is enabled, to the point that it obfuscates all other debug messages. Bump these messages up to the trace level so that they are less annoying.

Signed-off-by: William Findlay [email protected]

@willfindlay willfindlay requested a review from a team as a code owner February 1, 2023 16:03
@willfindlay willfindlay requested a review from olsajiri February 1, 2023 16:03
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

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

makes sense, thanks

The "Data message received" and "Data message used" log messages flood the Tetragon logs
when debug logging is enabled, to the point that it obfuscates all other debug messages.
Bump these messages up to the trace level so that they are less annoying.

Signed-off-by: William Findlay <[email protected]>
@willfindlay willfindlay force-pushed the pr/willfindlay/silence-data-logs branch from b41cf99 to c43afa6 Compare February 3, 2023 19:45
@tixxdz tixxdz merged commit c561a38 into main Feb 3, 2023
@tixxdz tixxdz deleted the pr/willfindlay/silence-data-logs branch February 3, 2023 21:23
@@ -45,7 +45,7 @@ func add(r *bytes.Reader, m *dataapi.MsgData) error {
dataMap.Add(m.Id, data)
}

logger.GetLogger().Debugf("Data message received id %v, size %v, total %v", m.Id, size, len(data))
logger.GetLogger().WithFields(nil).Tracef("Data message received id %v, size %v, total %v", m.Id, size, len(data))
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the WithFields can be removed? Or is the idea to encode the fields there?

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.

4 participants