cth_readableAn OTP library to be used for CT log outputs you want to be readable around all that noise they contain.
There are currently the following hooks:
cth_readable_shell, which shows failure stacktraces in the shell and
otherwise shows successes properly, in color.cth_readable_compact_shell, which is similar to the previous ones, but
only ouputs a period (.) for each successful testcth_readable_failonly, which only outputs error and SASL logs to the
shell in case of failures. It also provides cthr:pal/1-4 functions,
working like ct:pal/1-4, but being silenceable by that hook. A parse
transform exists to automatically convert ct:pal/1-3 into cthr:pal/1-3.
Also automatically handles lager. This hook buffers the IO/logging events,
and the buffer size can be limited with the max_events config option. The
default value is inf which means that all events are buffered.cth_readable_nosasl, which disables all SASL logging. It however requires
to be run before cth_readable_failonly to work.

Supported and enabled by default.
Add the following to your rebar.config:
{deps, [
{cth_readable, {git, "https://github.com/ferd/cth_readable.git", {tag, "v1.6.0"}}}
]}.
{ct_compile_opts, [{parse_transform, cth_readable_transform}]}.
{ct_opts, [{ct_hooks, [cth_readable_failonly, cth_readable_shell]}]}.
%% Or add limitations to how many messages are buffered with:
%% {ct_opts, [{ct_hooks, [{cth_readable_failonly, [{max_events, 1000}]}, cth_readable_shell]}]}.
If your lager handler has a custom formatter and you want that formatter to take effect, rather than using a configuration such as:
{lager, [
{handlers, [{lager_console_backend,
[info, {custom_formatter, [{app, "some-val"}]}]}
]}
]}.
Use:
{lager, [
{handlers, [{cth_readable_lager_backend,
[info, {custom_formatter, [{app, "some-val"}]}]}
]}
]}.
It will let you have both proper formatting and support for arbitrary configurations.
1.6.1:
1.6.0:
1.5.1:
cthr:pal/5 (thanks @ashleyjlive)1.5.0:
cth_readable_failonly (thanks @TheGeorge)1.4.9:
1.4.8:
1.4.7:
?assertNot() macro1.4.6:
1.4.5:
error_logger was no longer registered by default and lager log lines would silently get lost.1.4.4:
1.4.3:
1.4.2:
1.4.1:
1.4.0:
1.3.4:
1.3.3:
1.3.2:
1.3.1:
1.3.0:
1.2.6:
end_per_testcase errors as a non-critical failure when the test case passes1.2.5:
on_tc_skip/4 to fully prevent misreporting of skipped suites1.2.4:
1.2.3:
syntax_lib to syntax_tools as an app dependency1.2.2:
1.2.1:
1.2.0:
cf library for color output, adding support for 'dumb' terminals1.1.1:
poplist -> proplist, thanks to @egobrain1.1.0:
1.0.1:
1.0.0:
Erlang
100.0%
cth_readableAn OTP library to be used for CT log outputs you want to be readable around all that noise they contain.
There are currently the following hooks:
cth_readable_shell, which shows failure stacktraces in the shell and
otherwise shows successes properly, in color.cth_readable_compact_shell, which is similar to the previous ones, but
only ouputs a period (.) for each successful testcth_readable_failonly, which only outputs error and SASL logs to the
shell in case of failures. It also provides cthr:pal/1-4 functions,
working like ct:pal/1-4, but being silenceable by that hook. A parse
transform exists to automatically convert ct:pal/1-3 into cthr:pal/1-3.
Also automatically handles lager. This hook buffers the IO/logging events,
and the buffer size can be limited with the max_events config option. The
default value is inf which means that all events are buffered.cth_readable_nosasl, which disables all SASL logging. It however requires
to be run before cth_readable_failonly to work.

Supported and enabled by default.
Add the following to your rebar.config:
{deps, [
{cth_readable, {git, "https://github.com/ferd/cth_readable.git", {tag, "v1.6.0"}}}
]}.
{ct_compile_opts, [{parse_transform, cth_readable_transform}]}.
{ct_opts, [{ct_hooks, [cth_readable_failonly, cth_readable_shell]}]}.
%% Or add limitations to how many messages are buffered with:
%% {ct_opts, [{ct_hooks, [{cth_readable_failonly, [{max_events, 1000}]}, cth_readable_shell]}]}.
If your lager handler has a custom formatter and you want that formatter to take effect, rather than using a configuration such as:
{lager, [
{handlers, [{lager_console_backend,
[info, {custom_formatter, [{app, "some-val"}]}]}
]}
]}.
Use:
{lager, [
{handlers, [{cth_readable_lager_backend,
[info, {custom_formatter, [{app, "some-val"}]}]}
]}
]}.
It will let you have both proper formatting and support for arbitrary configurations.
1.6.1:
1.6.0:
1.5.1:
cthr:pal/5 (thanks @ashleyjlive)1.5.0:
cth_readable_failonly (thanks @TheGeorge)1.4.9:
1.4.8:
1.4.7:
?assertNot() macro1.4.6:
1.4.5:
error_logger was no longer registered by default and lager log lines would silently get lost.1.4.4:
1.4.3:
1.4.2:
1.4.1:
1.4.0:
1.3.4:
1.3.3:
1.3.2:
1.3.1:
1.3.0:
1.2.6:
end_per_testcase errors as a non-critical failure when the test case passes1.2.5:
on_tc_skip/4 to fully prevent misreporting of skipped suites1.2.4:
1.2.3:
syntax_lib to syntax_tools as an app dependency1.2.2:
1.2.1:
1.2.0:
cf library for color output, adding support for 'dumb' terminals1.1.1:
poplist -> proplist, thanks to @egobrain1.1.0:
1.0.1:
1.0.0:
Erlang
100.0%