Skip to content

feat: add journald log plugin#3806

Merged
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-journald-log-plugin
Oct 8, 2025
Merged

feat: add journald log plugin#3806
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-journald-log-plugin

Conversation

@reubenmiller
Copy link
Copy Markdown
Contributor

@reubenmiller reubenmiller commented Oct 6, 2025

Proposed changes

Add journald log plugin which is included in the deb and rpm packages only.

The plugin includes a special log type called "all-units" which when used will return the logs for all systemd units/services. It is the equivalent to doing journalctl -u "*". Having an option to return the logs for all units is useful when solving complex scenarios where behaviour across multiple services needs to be observed.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s. You can activate automatic signing by running just prepare-dev once)
  • I ran just format as mentioned in CODING_GUIDELINES
  • I used just check as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@reubenmiller reubenmiller requested review from a team and rina23q as code owners October 6, 2025 10:11
@reubenmiller reubenmiller added the theme:troubleshooting Theme: Troubleshooting and remote control label Oct 6, 2025
exit 1
fi
status=0
{ systemctl list-units --type=service --no-legend --no-pager --plain || status=$?; } | awk '!/^systemd/ { sub(/\.service$/, "", $1); print $1 }' || status=$?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately the pipefail option is not in the posix spec (or at least not in any recent versions), so we have to do use subshells and store the status if the systemctl command fails.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 6, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
711 0 3 711 100 2h6m48.053317999s

Copy link
Copy Markdown
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

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

The updated plugin looks fine. Happy to approve once the log plugin system test is fixed.

@albinsuresh
Copy link
Copy Markdown
Contributor

Should we have an "all" option which will return the logs from all units (not just the selected unit?)

Sounds good to me.

Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller force-pushed the feat-journald-log-plugin branch from 5bf1712 to fa52425 Compare October 8, 2025 07:54
@reubenmiller reubenmiller added this pull request to the merge queue Oct 8, 2025
Merged via the queue into thin-edge:main with commit b30a61c Oct 8, 2025
34 checks passed
@reubenmiller reubenmiller deleted the feat-journald-log-plugin branch October 8, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:troubleshooting Theme: Troubleshooting and remote control

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants