Skip to content

Include a newline at the end of operation event logs#2693

Merged
mkultraWasHere merged 3 commits into
apache:masterfrom
pirxthepilot:operation_logs_eol
Dec 20, 2022
Merged

Include a newline at the end of operation event logs#2693
mkultraWasHere merged 3 commits into
apache:masterfrom
pirxthepilot:operation_logs_eol

Conversation

@pirxthepilot
Copy link
Copy Markdown
Contributor

@pirxthepilot pirxthepilot commented Nov 24, 2022

Description

Operation event logs do not terminate with a newline, which causes certain log forwarding agents not to process the line. In addition, not having the newline seems to break the POSIX definition of a line, defined as:

A sequence of zero or more non- characters plus a terminating character.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I verified that adding os.linesep after json.dumps() works. I also expect the test_writing_event_logs_to_disk test to pass without issue.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

@pirxthepilot
Copy link
Copy Markdown
Contributor Author

Adding for context: vectordotdev/vector#15339

@mkultraWasHere mkultraWasHere self-assigned this Dec 13, 2022
@pirxthepilot
Copy link
Copy Markdown
Contributor Author

Hmm, not sure how to fix those build errors. Looks like failure in the builds themselves?

@mkultraWasHere
Copy link
Copy Markdown
Contributor

@pirxthepilot it's not you, existing issue with branches from forks. No worries, hoping to look at PR later this week when I have a sec.

@mkultraWasHere mkultraWasHere added the good first issue Want to contribute but don't know where to start? Start with one of these! label Dec 19, 2022
@mkultraWasHere mkultraWasHere added the good submission Quality Contribution (Question/Issue/PR are well explained/documented or impactful) label Dec 20, 2022
@mkultraWasHere mkultraWasHere merged commit 31feaaa into apache:master Dec 20, 2022
@mkultraWasHere
Copy link
Copy Markdown
Contributor

Ty @pirxthepilot

@pirxthepilot
Copy link
Copy Markdown
Contributor Author

@elegantmoose thanks as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Want to contribute but don't know where to start? Start with one of these! good submission Quality Contribution (Question/Issue/PR are well explained/documented or impactful)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants