Module log_journald

Tiny interface to Journald socket.

Description

Tiny interface to Journald socket

See man sd_journal_send, man systemd.journal-fields See [/src/journal/journal-send.c#L206-L337]

Data Types

handle()

abstract datatype: handle()

log_msg()

log_msg() = #{iodata() => iodata() | integer() | atom()}

Function Index

log/2Logs a Key - Value message to journald socket Keys have to be iodata()` and should not contain newlines or `= signs Values can be iodata(), atom() or integer() and may contain any characters.
open/1Opens journald log socket.

Function Details

log/2

log(KV::log_msg(), State::handle()) -> ok | {error, inet:posix()}

Logs a Key - Value message to journald socket Keys have to be iodata()` and should not contain newlines or `= signs Values can be iodata(), atom() or integer() and may contain any characters. utf8 is preferrable

open/1

open(Opts::#{socket_path => file:filename_all()}) -> handle()

Opens journald log socket


Generated by EDoc