<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You’re, iirc, supposed to call lager_common_test_backend:bounce/1, otherwise I’m not sure how it works.<br class=""><div><blockquote type="cite" class=""><div class="">8 апр. 2017 г., в 8:48, Bjarne Wichmann Bagge Petersen <<a href="mailto:bp@shopgun.com" class="">bp@shopgun.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">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. </div><div class=""><br class=""></div><div class="">In `init_pr_suite` I have </div><div class=""><br class=""></div><div class="">application:load(lager),<br class=""></div><div class=""><div class="">application:set_env(lager, handlers, [{lager_console_backend, debug}, {lager_common_test_backend, debug}]),</div></div><div class=""><br class=""></div><div class="">And in the test-code I have this little snippet:</div><div class=""><br class=""></div><div class=""><div class="">    ct:log("ENV ~p", [application:get_all_env(lager)]),</div><div class="">    lager:warning("Now you see me"),</div><div class="">    lager:debug("Now you don't"),</div></div><div class=""><br class=""></div><div class="">Which outputs:</div><div class=""><br class=""></div><div class=""><div class="">*** User 2017-04-08 07:36:42.089 ***</div><div class="">ENV [{crash_log_count,5},</div><div class="">     {crash_log_date,"$D0"},</div><div class="">     {colored,false},</div><div class="">     {crash_log_msg_size,65536},</div><div class="">     {colors,[{debug,"\e[0;38m"},</div><div class="">              {info,"\e[1;37m"},</div><div class="">              {notice,"\e[1;36m"},</div><div class="">              {warning,"\e[1;33m"},</div><div class="">              {error,"\e[1;31m"},</div><div class="">              {critical,"\e[1;35m"},</div><div class="">              {alert,"\e[1;44m"},</div><div class="">              {emergency,"\e[1;41m"}]},</div><div class="">     {included_applications,[]},</div><div class="">     {async_threshold,20},</div><div class="">     {crash_log_size,10485760},</div><div class="">     {error_logger_whitelist,[cth_readable_failonly]},</div><div class="">     {error_logger_redirect,true},</div><div class="">     {async_threshold_window,5},</div><div class="">     {crash_log,"log/crash.log"},</div><div class="">     {error_logger_hwm,50},</div><div class="">     {handlers,[{lager_console_backend,debug},</div><div class="">                {lager_common_test_backend,debug}]}]</div><div class=""><br class=""></div><div class="">*** User 2017-04-08 07:36:42.090 ***</div><div class="">07:36:42.089 [warning] Now you see me</div><div class=""><br class=""></div></div><div class=""><br class=""></div><div class="">Missing the debug-line.</div><div class=""><br class=""></div><div class="">So what am I missing? Is `lager_common_test_backend` the wrong flag? Or is CT muting debug-messages anyway?</div><div class=""><br class=""></div><br clear="all" class=""><div class=""><div class="gmail-m_-4121641883667506117gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div style="font-size:12.8px" class="">Best regards</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">Bjarne Wichmann Bagge Petersen</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">Backend Developer<span style="color:rgb(68,68,68);line-height:20.8px;white-space:pre-wrap;font-size:12.8px" class="">, ShopGun</span></div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;white-space:pre-wrap;word-wrap:break-word;color:rgb(68,68,68);line-height:20.8px" class=""><br class=""></pre><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">E: <a href="mailto:bp@shopgun.com" target="_blank" class="">bp@shopgun.com</a> </span><br class=""></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">L: </span><a href="http://dk.linkedin.com/in/bjarnewp" style="font-size:12.8px" target="_blank" class="">dk.linkedin.com/in/bjarnewp</a><br class=""></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">W: <a href="http://shopgun.com/" target="_blank" class="">shopgun.com</a> </span><br class=""></div><div class=""><span style="line-height:20.8px;white-space:pre-wrap;color:rgb(68,68,68);font-size:12.8px" class="">A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S, Denmark</span></div></div></div></div></div></div></div></div>
</div>

<br class="">
<div class=""><span style="font-size:small;background-color:rgb(255,255,255)" class="">ShopGun</span><span style="font-size:small;background-color:rgb(255,255,255)" class="">, your helping hand in shopping, is available at </span><a href="http://shopgun.com/" style="font-size:small;background-color:white" target="_blank" class="">shopgun.com</a><span style="font-size:small;background-color:white" class=""> and as the </span><a href="http://shopgun.com/app/download/" style="font-size:small;background-color:white" target="_blank" class="">ShopGun app</a><font size="2" class=""><span style="background-color:rgb(255,255,255)" class="">.</span></font></div><div style="font-size:1.3em" class=""><span style="background-color:white" class=""><font size="2" class=""><br class=""></font></span></div><div style="font-size:1.3em" class=""><span style="background-color:white" class=""><font color="#808080" size="2" class="">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.</font></span></div>_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>