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

Make whitespace trimming in log messages optional #506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chombium
Copy link
Contributor

Description

The Log Cache Syslog server trims leading and trailing whitespace in the messages. The log messages should be not changed.

This change:

  • adds config parameter to define if the whitespace in the log messages should be trimmed or not
  • trims or leaves the log message untouched based on the config parameter

The default behavior is to trim the log messages, so that it is compatible with the behavior up until now.

Fixes #505

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing performed?

  • Unit tests
  • Integration tests
  • Acceptance tests

Checklist:

  • This PR is being made against the main branch, or relevant version branch
  • I have made corresponding changes to the documentation
  • I have added testing for my changes

The Log Cache Syslog server trims leading and trailing whitespace in the
messages. The log messages should be not changed.

This change:
- adds config parameter to define if the whitespace in the log messages
should be trimmed or not
- trims or leaves the log message untouched based on the config
parameter

The default behavior is to trim the log messages, so that it is
compatible with the behavior up until now.
@chombium chombium requested a review from a team as a code owner May 13, 2024 15:35
Copy link
Member

@mkocher mkocher left a comment

Choose a reason for hiding this comment

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

This change makes sense to me.

@@ -151,6 +152,39 @@ var _ = Describe("Syslog", func() {
))
})

It("doesn't trim whitespace in log messages", func() {
Copy link
Member

Choose a reason for hiding this comment

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

Should there be contexts for with and without trimming to test both cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pending Review | Discussion
Development

Successfully merging this pull request may close these issues.

Log Cache Syslog server trims leading and trailing whitespace in the log messages
2 participants