Copyright © 2014-2016 Takeru Ohta <phjgt308@gmail.com>
Sinks
A sink has the specification of a sink process (logi_sink_proc
).
A sink process manages a sink writer (logi_sink_writer
).
logi_builtin_sink_XXX
modules for usage examples.
id() = term()
The identifier of a sink
The scope of an identifier is limited in siblings with the same parent.abstract datatype: sink()
A sink
spec() = supervisor:child_spec()
The specification of a sink process.
See official documents of supervisor
for more information.
restart
field is ignored (always regarded as permanent
).
sup_flags() = supervisor:sup_flags()
The supervise flags of a sink process.
See official documents of supervisor
for more information.
strategy
field is ignored.
from_writer/2 | Creates a sink from standalone a writer instance. |
get_id/1 | Equivalent to maps:get(id, get_spec(Sink)). |
get_spec/1 | Gets the process specification of Sink |
get_sup_flags/1 | Gets the supervise flags of Sink |
is_sink/1 | Returns true if X is a sink, false otherwise. |
new/1 | Equivalent to new(Spec, #{}). |
new/2 | Creates a new sink. |
from_writer(Id::id(), Writer::logi_sink_writer:writer()) -> sink()
Creates a sink from standalone a writer instance
No specific sink process is needed byWriter
to write log messages.
Equivalent to maps:get(id, get_spec(Sink)).
Gets the process specification of Sink
get_sup_flags(Logi_sink::sink()) -> sup_flags()
Gets the supervise flags of Sink
is_sink(X::sink() | term()) -> boolean()
Returns true
if X
is a sink, false
otherwise
Equivalent to new(Spec, #{}).
new(Spec::spec(), Flags::sup_flags()) -> sink()
Creates a new sink
Generated by EDoc