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

Filter journalctl per unit and update project to Go 1.12 using modules #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ruben-ortiz-buybay
Copy link

One of the requirements to implement is to move logs for some specific systemctl service (basically, split between system logs and application logs)

What is included in this PR:

  • update the project to Go 1.12
  • using Go modules to manage dependencies (keeping the original dependencies)
  • golint friendly code
  • added a new configuration parameter to filter multiple units. Not using the parameter will keep the original behaviour of the service
  • update documentation with the new configuration

@fleaz
Copy link

fleaz commented Jul 3, 2020

Hey,
Thanks for this PR!
I just merged this into my fork because I wanted to have this feature and found an issue: When you want to mimic the use of journalctl -u foo you need to use _SYSTEMD_UNIT= instead of SYSLOG_IDENTIFIER= in line 28 of journal.go. To filter on SYSLOG_IDENTIFIER one would use journalctl -t foo and the two values are not always the same. See this commit for the changes I made.

john-pierce added a commit to QuicketSolutions/journald-cloudwatch-logs that referenced this pull request Sep 18, 2020
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.

2 participants