NAME

Log::Abstraction::Backend::Journald - send messages to the systemd journal

VERSION

0.40

DESCRIPTION

Built for the journald key of a logger hash. Each message is one datagram in the journald native protocol (https://systemd.io/JOURNAL_NATIVE_PROTOCOL/), with the fields MESSAGE (with a format, the formatted line), PRIORITY, SYSLOG_IDENTIFIER, the hash's other keys upper-cased, and the structured fields. A message too big for one datagram is truncated. A failed send carps, once until a send succeeds again. The socket is opened for the first message and reused for the next ones, until a send fails.

For use by Log::Abstraction only; see Log::Abstraction::Backend.

METHODS

new

my $backend = Log::Abstraction::Backend::Journald->new(
    journald => \%journald, level => $level, format => $format,
);

emit

$backend->emit($logger, $event);

AUTHOR

Nigel Horne njh@nigelhorne.com

SEE ALSO

Log::Abstraction, Log::Abstraction::Backend

COPYRIGHT AND LICENSE

Copyright (C) 2025-2026 Nigel Horne

Usage is subject to the GPL2 licence terms. If you use it, please let me know.