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

Add a Journald Logger #5

Merged
merged 6 commits into from
May 6, 2019
Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Apr 5, 2019

Adds a class enabling users to add entries into the journald log with a standard ruby Logger interface.

@Fryguy
Copy link
Member

Fryguy commented Apr 5, 2019

Nice! We just have to make sure this gem and MIQ will still "work" on non-journald systems

@carbonin
Copy link
Member

carbonin commented Apr 5, 2019

Is this really not "A Thing" already?

I haven't looked very hard, but it seems like a very common use case.

Alternatively if we're running under systemd, could we log to stdout and have that captured by the journal?

@agrare
Copy link
Member Author

agrare commented Apr 5, 2019

Is this really not "A Thing" already?

Foreman has a logger (https://github.com/theforeman/journald-logger) but it uses a C extension (https://github.com/theforeman/journald-native) which requires the systemd devel headers, whereas this gem uses FFI (https://github.com/ledbettj/systemd-journal)

Alternatively if we're running under systemd, could we log to stdout and have that captured by the journal?

Yeah I considered that but this gives us control over the log severity which is helpful for using filtering with journalctl --priority=err

@agrare agrare changed the title [WIP] Add a Journald Logger Add a Journald Logger May 6, 2019
@agrare
Copy link
Member Author

agrare commented May 6, 2019

Okay @Fryguy this should be good to go

@carbonin carbonin self-assigned this May 6, 2019
@carbonin carbonin added the enhancement New feature or request label May 6, 2019
@carbonin carbonin merged commit fb9c4de into ManageIQ:master May 6, 2019
@carbonin carbonin mentioned this pull request May 15, 2019
@agrare agrare deleted the add_journald_logger branch May 20, 2019 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants