[erlang-questions] Lager & Common Test question

Robert Raschke rtrlists@REDACTED
Mon Nov 10 11:06:39 CET 2014


Hi Oleg,

a very recent addition to the lager beckends appears to be a common_test
one:
https://github.com/basho/lager/blob/master/src/lager_common_test_backend.erl

So, you could either run against the HEAD, or alternatively (as I do), copy
the file next to your CT suites and tweak as you require (I changed the
ct:pal/1 calls to ct:log/1).

My CT sys.config now contains:

    { lager, [
        { handlers, [
            { lager_console_backend, error },
            { lager_common_test_backend, debug }
        ] }
    ] }

So, for me, everything goes into the CT logs, and only errors to the
console.

Hope this helps,
Robby


On 9 November 2014 21:24, Oleg Tsarev <oleg@REDACTED> wrote:

> Hello!
>
> I use lager + common test.
> I configured lager for output to console.
>
> During test lager calls print output to my terminal, and test-related log
> is empty.
> io:format works as I want - no output in my terminal, only in test-related
> log.
>
> How I can configure lager for see lager outputs in the log file instead of
> terminal?
>
> Best regards, Oleg
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141110/eb902655/attachment.htm>


More information about the erlang-questions mailing list