Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just wanted to propose a handler to log to
systemd-journal
service, this is going to give us all the benefits of this service (better search and indexing, better integration with the OS, richer metadata for log records).To use it, you're gonna need to have php-systemd extension installed in your system.
I have one concern for this PR though, I had to make
checkSystemdExtension
andsendToJournal
public methods instead of private or protected to make it easy to mock in the tests (we don't want for sure to send real log records during test execution). I could wrap those methods functionality in a separated class but it looked like too much just for test cases stuff. You tell me :)Thanks!