[erlang-questions] CT: outputting lager debug messages

Bjarne Wichmann Bagge Petersen bp@REDACTED
Sat Apr 8 07:48:54 CEST 2017

I have a little issue where I would like to output lager debug-messages
when running common tests. But I can't get it to work.

In `init_pr_suite` I have

application:set_env(lager, handlers, [{lager_console_backend, debug},
{lager_common_test_backend, debug}]),

And in the test-code I have this little snippet:

    ct:log("ENV ~p", [application:get_all_env(lager)]),
    lager:warning("Now you see me"),
    lager:debug("Now you don't"),

Which outputs:

*** User 2017-04-08 07:36:42.089 ***
ENV [{crash_log_count,5},

*** User 2017-04-08 07:36:42.090 ***
07:36:42.089 [warning] Now you see me

Missing the debug-line.

So what am I missing? Is `lager_common_test_backend` the wrong flag? Or is
CT muting debug-messages anyway?

Best regards

Bjarne Wichmann Bagge Petersen

Backend Developer, ShopGun

L: dk.linkedin.com/in/bjarnewp
W: shopgun.com
A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S, Denmark

ShopGun, your helping hand in shopping, is available at shopgun.com and as 
the ShopGun app <http://shopgun.com/app/download/>.

This email is intended solely for the addressee and may contain 
confidential information and/or privileged confidential advice. If you 
receive this email by mistake, please do not read, print, transmit, store, 
or in any other way use the email or its attachments. Instead, please 
notify the addresser immediately and then permanently delete it. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170408/d8b18ad0/attachment.htm>

More information about the erlang-questions mailing list