The repository contains logging tools which follow JobTeaser conventions.
The project can be built with:
make
Tests can be run with:
make test
The jt_log_formatter
module can be used with the standard Erlang logger, in
the configuration of the logger
application.
For example:
[
{kernel,
[{logger, [{handler, default, logger_std_h,
#{filter_default => log,
formatter => {jt_log_formatter,
#{format => text, color => true}}}
}]},
{logger_level, info}
]}
].
You also need to make sure that jt_log
is a dependency of your Rebar3
project, and that your release loads the jt_log
application, e.g. in the
Rebar3 configuration:
{relx, [{release, {my_app, "dev"}, [inets, sasl, jt_log, my_app]}]}.
The formatter supports two formats: text
(with or without colors) and json
.
Code documentation is available at https://jobteaser-oss.github.io/erl-jt-log/doc.