Behaviours: application.
datetime1970() = calendar:datetime1970()
direction() = ascending | descending
erl_opts() = erlang_node | application | code_file | function
id() = term() | pid()
io_options() = {name, string()} | {log_level, log_level()} | {level_prefix, string()}
log_data() = string() | [string()]
depends on the 'message' option
log_level() = emergency | alert | critical | error | warning | notice | info | debug
log_message() = {datetime1970(), log_level(), log_data()} | {'EXIT', pid(), atom()} | journal_invalidate
log_options() = {direction, direction()} | {since, datetime1970()} | {until, datetime1970()} | {at_most, integer()} | {log_level, log_level()} | {message, boolean()} | {regex, iodata()} | {erl_opts(), atom()}
notify_options() = {message, boolean()} | {regex, iodata()} | {log_level, log_level()} | {dir, list()} | {erl_opts(), atom()}
reader_options() = {dir, string()}
sink() = pid() | sink_fun()
sink_fun() = fun((log_message()) -> any())
| get_logs/1 | Get logs from default reader. |
| get_logs/2 | Get logs from a named reader. |
| log_notify/2 | Starts a worker that monitors the journal and filters new entries. |
| start/2 | Application behaviour callback. |
| start_io/1 | Start the default I/O-server named ejournald_io_server and identified by the name "ejournald_io_server" for journald. |
| start_io/2 | Start an I/O-server with own options. |
| start_reader/1 | Start an unnamed reader. |
| start_reader/2 | Start a named reader. |
| stop/1 | Application behaviour callback. |
| stop_io/1 | Stop an I/O-server with its name or pid. |
| stop_log_notify/1 | Stops the worker. |
| stop_reader/1 | Stop a reader by its name or pid. |
get_logs(Options::[log_options()]) -> [log_message()] | {error, any()}
Get logs from default reader. See get_logs/2.
get_logs(Id::id(), Options::[log_options()]) -> [log_message()] | {error, any()}
Get logs from a named reader.
log_notify(Sink::sink(), Options::[notify_options()]) -> {ok, pid()} | {error, any()}
Starts a worker that monitors the journal and filters new entries. Note that the message 'journal_invalidate' means that "journal files were added or removed (possibly due to rotation)" according to the systemd documentation. Thus you should e.g. refresh your monitors.
start(Type, Args) -> any()
Application behaviour callback.
start_io(Options::[io_options()]) -> {ok, pid()} | {error, any()}
Start the default I/O-server named ejournald_io_server and identified by the name "ejournald_io_server" for journald.
start_io(Name::term(), Options::[io_options()]) -> {ok, pid()} | {error, any()}
Start an I/O-server with own options. The 'name' option is mandatory and used in journald logs.
start_reader(Options::[reader_options()]) -> {ok, pid()} | {error, any()}
Start an unnamed reader.
start_reader(Name::term(), Options::[reader_options()]) -> {ok, pid()} | {error, any()}
Start a named reader.
stop(State) -> any()
Application behaviour callback.
stop_io(Id::term()) -> ok | {error, any()}
Stop an I/O-server with its name or pid.
stop_log_notify(Pid::pid()) -> ok | {error, any()}
Stops the worker.
stop_reader(Id::term()) -> ok | {error, any()}
Stop a reader by its name or pid.
Generated by EDoc