Copyright © 2015-2016 Takeru Ohta <phjgt308@gmail.com>
Behaviours: logi_sink_writer.
A sink which prints log messages to the console
The sink has no overload protections,
so it is recommended to use it together with (for example) logi_slink_flow_limiter
in a production environment.
> error_logger:tty(false). % Suppresses annoying warnings for the sake of brevity
>
> logi_channel:install_sink(logi_sink_console:new(foo), info).
> logi:info("hello world").
2015-11-03 10:58:59.920 [info] nonode@nohost <0.113.0> erl_eval:do_apply:673 [] hello world
Uses other layout:
> logi_channel:install_sink(logi_sink_console:new(foo, logi_layout_io_lib_format:new()), info).
> logi:info("hello world").
hello world
default_layout/0 | Default layout. |
new/1 | Equivalent to new(SinkId, default_layout()). |
new/2 | Creates a new sink. |
default_layout() -> Layout::logi_layout:layout(unicode:chardata())
Default layout
Layout
is logi_layout_newline:new(logi_layout_color:new(logi_layout_limit:new(logi_layout_default:new())))
new(SinkId::logi_sink:id()) -> logi_sink:sink()
Equivalent to new(SinkId, default_layout()).
new(SinkId::logi_sink:id(), Layout::logi_layout:layout(unicode:chardata())) -> logi_sink:sink()
Creates a new sink
Generated by EDoc, Sep 27 2018, 23:13:24.