Skip to content

A simple Library to write to Systemd's Journald from PHP.

License

Notifications You must be signed in to change notification settings

theseer/journald

Repository files navigation

Journald

A simple Library to write to Systemd's Journald from 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')
);

About

A simple Library to write to Systemd's Journald from PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages