[erlang-questions] How to capture all output to console during Common Test?
Sat Jun 10 09:14:41 CEST 2017
Well, it's possible to start your own Erlang IO server, start it in ct hook
during init, and then make it as a group leader for root ct process.
So just start your own process that handles io_reply, io_request, and then
On Sat, Jun 10, 2017 at 4:09 AM, Fred Hebert <mononcqc@REDACTED> wrote:
> On 06/09, Max Lapshin wrote:
>> I'm running ct_run and want somehow to capture all output made to console
>> (io:format, ct:print). Is it possible?
> I ended up doing this for rebar3 through the cth_readable library. The
> only practical way I found to hijack all traffic was to use a parse
> transform to replace the function and tunnel it through my own.
> Here's the parse transform I used for ct:pal/2-3 :
> dable_failonly.erl shows how I got to capture and redirect most of lager
> and error_logger's traffic as well, but it's fairly messy.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions