Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theseer/journald
A simple Library to write to Systemd's Journald from PHP.
https://github.com/theseer/journald
Last synced: 3 months ago
JSON representation
A simple Library to write to Systemd's Journald from PHP.
- Host: GitHub
- URL: https://github.com/theseer/journald
- Owner: theseer
- License: bsd-3-clause
- Created: 2022-05-02T23:20:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-24T01:00:43.000Z (about 1 year ago)
- Last Synced: 2024-05-09T09:12:32.423Z (8 months ago)
- Language: PHP
- Size: 79.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Journald
A simple Library to write to Systemd's Journald from PHP.
```php
use theseer\journald\JournalWriter;
use theseer\journald\JournalEntry;
use theseer\journald\SocketPath;function sample() {
throw new RuntimeException('Test Exception Message');
}try {
sample();
} catch (Throwable $t) {
(new JournalWriter(SocketPath::default()))->write(
JournalEntry::fromThrowable($t)
);
}(new JournalWriter(SocketPath::default()))->write(
JournalEntry::fromMessage('This is a test')
);```