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(systemd): Send all zebrad logs to the journal under systemd #7965

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Nov 20, 2023

Motivation

In bug #7961 a user reported that they only get panic messages in the systemd journal. But we'd like all Zebra logs to go there.

This does not close that ticket, but it will be useful to help diagnose future issues like it.

PR Author Checklist

Check before marking the PR as ready for review:

  • Will the PR name make sense to users?
  • Does the PR have a priority label?
  • Have you added or updated tests?
  • Is the documentation up to date?
For significant changes:
  • Is there a summary in the CHANGELOG?
  • Can these changes be split into multiple PRs?

If a checkbox isn't relevant to the PR, mark it as done.

Specifications

https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#StandardOutput=

Complex Code or Requirements

The journald feature should also do something similar, but it will provide structured logs, rather than just log lines.

Solution

Send all zebrad output to the journal under systemd

Testing

This is difficult to test unless someone is already running Zebra with systemd.

Review

This is a routine fix.

Reviewer Checklist

Check before approving the PR:

  • Does the PR scope match the ticket?
  • Are there enough tests to make sure it works? Do the tests cover the PR motivation?
  • Are all the PR blockers dealt with?
    PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.

@teor2345 teor2345 added C-enhancement Category: This is an improvement P-Medium ⚡ I-usability Zebra is hard to understand or use A-diagnostics Area: Diagnosing issues or monitoring performance labels Nov 20, 2023
@teor2345 teor2345 self-assigned this Nov 20, 2023
@teor2345 teor2345 requested a review from a team as a code owner November 20, 2023 05:29
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team November 20, 2023 05:29
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

I think this changes make sense, will probably work but i will like to test them locally by someone before merging. should not be that hard, could be us or we can ask the ticket creator to test it.

This is difficult to test unless someone is already running Zebra with systemd.

It is that difficult ? If so, we should think on writing a book page on how to achieve this.

@teor2345
Copy link
Contributor Author

This is difficult to test unless someone is already running Zebra with systemd.

It is that difficult ? If so, we should think on writing a book page on how to achieve this.

I think it's the systemd part that's hard, adding Zebra if you're already running systemd should be pretty easy.

@arya2 arya2 added the do-not-merge Tells Mergify not to merge this PR label Dec 11, 2023
@teor2345 teor2345 removed the do-not-merge Tells Mergify not to merge this PR label Dec 12, 2023
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

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

utACK. I assume this will not make any harm.

mergify bot added a commit that referenced this pull request Dec 12, 2023
@mergify mergify bot merged commit fa4c80f into main Dec 12, 2023
3 checks passed
@mergify mergify bot deleted the journal-logs branch December 12, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance C-enhancement Category: This is an improvement I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants