Tiny interface to Journald socket
See man sd_journal_sendv
, man systemd.journal-fields
abstract datatype: handle()
key() = iodata()
log_msg() = #{key() => value()} | [{key(), value()}]
value() = iodata() | integer() | atom()
close/1 | Closes journald log socket. |
format/1 | Formats a flat Key-Value message to a (non-documented) format acceptable by journald socket. |
log/2 | Logs a Key - Value message to journald socket. |
open/1 | Opens journald log socket. |
close(State::handle()) -> ok
Closes journald log socket
format(Map::log_msg()) -> iodata()
Formats a flat Key-Value message to a (non-documented) format acceptable by journald socket
log(KV::log_msg(), State::handle()) -> ok | {error, inet:posix()}
Logs a Key - Value message to journald socket
Keys have to beiodata()
and should not contain newlines or =
signs.
Values can be iodata()
, atom()
or integer()
and may contain any binaries. utf8 is
preferrable
open(Opts::#{socket_path => file:filename_all()}) -> handle()
Opens journald log socket
Generated by EDoc