Copyright © 2014-2016 Takeru Ohta <phjgt308@gmail.com>
Behaviours: logi_layout.
A default layout for built-in sinks
This module layouts a log message by the following format:{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}.{SSS} [{SEVERITY}] {NODE} {PID} {MODULE}:{FUNCTION}:{LINE} [{HEADER(KEY=VALUE)}*] {MESSAGE}\n
This module is provided for debuging/testing purposes only. The message format is not customizable. And no overload protection exists (e.g. if log message is too large, the caller process may hang).
> error_logger:tty(false). % Suppresses annoying warning outputs for brevity
> Layout = logi_builtin_layout_default:new().
> {ok, _} = logi_channel:install_sink(logi_builtin_sink_io_device:new(foo, [{layout, Layout}]), info).
> logi:info("hello world").
2015-10-21 15:06:42.842 [info] nonode@nohost <0.91.0> erl_eval:do_apply:673 [] hello world
new/0 | Creates a layout. |
new() -> logi_layout:layout(io_lib:chars())
Creates a layout
Generated by EDoc