<div dir="ltr">I was too quick to celebrate. <div><br></div><div>There is a side effect to</div><div><br></div><div><span style="color:rgb(80,0,80);font-size:12.8px">lager_common_test_backend:</span><span style="color:rgb(80,0,80);font-size:12.8px">boun<wbr>ce(debug)</span><br></div><div><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div><span style="color:rgb(80,0,80);font-size:12.8px">in that i mutes non-lager error messages from the CT logs (html), though I do see them in the console now.</span></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8000001907349px">Best regards</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Bjarne Wichmann Bagge Petersen</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Backend Developer<span style="color:rgb(68,68,68);line-height:20.7999992370605px;white-space:pre-wrap;font-size:12.8000001907349px">, 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.7999992370605px"><br></pre><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">E: <a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a> </span><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">L: </span><a href="http://dk.linkedin.com/in/bjarnewp" style="font-size:12.8000001907349px" target="_blank">dk.linkedin.com/in/bjarnewp</a><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">W: <a href="http://shopgun.com" target="_blank">shopgun.com</a> </span><br></div><div><span style="line-height:20.7999992370605px;white-space:pre-wrap;color:rgb(68,68,68);font-size:12.8000001907349px">A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S, Denmark</span></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-04-18 15:07 GMT+02:00 Bjarne Wichmann Bagge Petersen <span dir="ltr"><<a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Great, thanks.</div><span class=""><div><br></div><div><span style="font-size:12.8px">init_per_suite(Cfg) -></span><br style="font-size:12.8px"><span style="font-size:12.8px"> lager_common_test_backend:</span><span style="font-size:12.8px">boun<wbr>ce(debug),</span><br style="font-size:12.8px"><span style="font-size:12.8px"> Cfg.</span><br></div><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">did the trick, now I am getting debug messages in tests. :-)</span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-5227954750644108403gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span class=""><div style="font-size:12.8000001907349px">Best regards</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Bjarne Wichmann Bagge Petersen</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Backend Developer<span style="color:rgb(68,68,68);line-height:20.7999992370605px;white-space:pre-wrap;font-size:12.8000001907349px">, 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.7999992370605px"><br></pre><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">E: <a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a> </span><br></div></span><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">L: </span><a href="http://dk.linkedin.com/in/bjarnewp" style="font-size:12.8000001907349px" target="_blank">dk.linkedin.com/in/bjarnewp</a><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">W: <a href="http://shopgun.com" target="_blank">shopgun.com</a> </span><br></div><span class=""><div><span style="line-height:20.7999992370605px;white-space:pre-wrap;color:rgb(68,68,68);font-size:12.8000001907349px">A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S, Denmark</span></div></span></div></div></div></div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">2017-04-12 17:42 GMT+02:00 Jacob <span dir="ltr"><<a href="mailto:jacob01@gmx.net" target="_blank">jacob01@gmx.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am using this code in my test suite modules to catch lager debug output:<br>
<br>
init_per_suite(Cfg) -><br>
lager_common_test_backend:boun<wbr>ce(debug),<br>
Cfg.<br>
<br>
No other changes are required. The lager logging messages are then<br>
included in the regular test suite output files.<br>
<br>
Best regards<br>
<br>
Jacob<br>
<span><br>
On 04/12/2017 05:32 PM, Luis Rascão wrote:<br>
> Maybe you're missing `lager:set_loglevel(lager_cons<wbr>ole_backend, debug).` ?<br>
><br>
> On Sat, Apr 8, 2017 at 6:48 AM, Bjarne Wichmann Bagge Petersen<br>
</span><div><div class="m_-5227954750644108403h5">> <<a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a> <mailto:<a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a>>> wrote:<br>
><br>
> I have a little issue where I would like to output lager<br>
> debug-messages when running common tests. But I can't get it to work.<br>
><br>
> In `init_pr_suite` I have<br>
><br>
> application:load(lager),<br>
> application:set_env(lager, handlers, [{lager_console_backend,<br>
> debug}, {lager_common_test_backend, debug}]),<br>
><br>
> And in the test-code I have this little snippet:<br>
><br>
> ct:log("ENV ~p", [application:get_all_env(lager<wbr>)]),<br>
> lager:warning("Now you see me"),<br>
> lager:debug("Now you don't"),<br>
><br>
> Which outputs:<br>
><br>
> *** User 2017-04-08 07:36:42.089 ***<br>
> ENV [{crash_log_count,5},<br>
> {crash_log_date,"$D0"},<br>
> {colored,false},<br>
> {crash_log_msg_size,65536},<br>
> {colors,[{debug,"\e[0;38m"},<br>
> {info,"\e[1;37m"},<br>
> {notice,"\e[1;36m"},<br>
> {warning,"\e[1;33m"},<br>
> {error,"\e[1;31m"},<br>
> {critical,"\e[1;35m"},<br>
> {alert,"\e[1;44m"},<br>
> {emergency,"\e[1;41m"}]},<br>
> {included_applications,[]},<br>
> {async_threshold,20},<br>
> {crash_log_size,10485760},<br>
> {error_logger_whitelist,[cth_r<wbr>eadable_failonly]},<br>
> {error_logger_redirect,true},<br>
> {async_threshold_window,5},<br>
> {crash_log,"log/crash.log"},<br>
> {error_logger_hwm,50},<br>
> {handlers,[{lager_console_back<wbr>end,debug},<br>
> {lager_common_test_backend,de<wbr>bug}]}]<br>
><br>
> *** User 2017-04-08 07:36:42.090 ***<br>
> 07:36:42.089 [warning] Now you see me<br>
><br>
><br>
> Missing the debug-line.<br>
><br>
> So what am I missing? Is `lager_common_test_backend` the wrong flag?<br>
> Or is CT muting debug-messages anyway?<br>
><br>
><br>
> Best regards<br>
><br>
><br>
> Bjarne Wichmann Bagge Petersen<br>
><br>
> Backend Developer, ShopGun<br>
><br>
><br>
</div></div>> E: <a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a> <mailto:<a href="mailto:bp@shopgun.com" target="_blank">bp@shopgun.com</a>><br>
> L: <a href="http://dk.linkedin.com/in/bjarnewp" rel="noreferrer" target="_blank">dk.linkedin.com/in/bjarnewp</a> <<a href="http://dk.linkedin.com/in/bjarnewp" rel="noreferrer" target="_blank">http://dk.linkedin.com/in/bja<wbr>rnewp</a>><br>
> W: <a href="http://shopgun.com" rel="noreferrer" target="_blank">shopgun.com</a> <<a href="http://shopgun.com" rel="noreferrer" target="_blank">http://shopgun.com</a>><br>
<span>> A: Arne Jacobsens Allé 16, Field's, 3rd floor, DK-2300 København S,<br>
> Denmark<br>
><br>
> ShopGun, your helping hand in shopping, is available at <a href="http://shopgun.com" rel="noreferrer" target="_blank">shopgun.com</a><br>
</span>> <<a href="http://shopgun.com" rel="noreferrer" target="_blank">http://shopgun.com</a>> and as the ShopGun app<br>
> <<a href="http://shopgun.com/app/download/" rel="noreferrer" target="_blank">http://shopgun.com/app/downl<wbr>oad/</a>>.<br>
<span>><br>
> This email is intended solely for the addressee and may contain<br>
> confidential information and/or privileged confidential advice. If<br>
> you receive this email by mistake, please do not read, print,<br>
> transmit, store, or in any other way use the email or its<br>
> attachments. Instead, please notify the addresser immediately and<br>
> then permanently delete it. Thank you.<br>
><br>
> _____________________________<wbr>__________________<br>
> erlang-questions mailing list<br>
</span>> <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlan<wbr>g.org</a>><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/lis<wbr>tinfo/erlang-questions</a><br>
<div class="m_-5227954750644108403HOEnZb"><div class="m_-5227954750644108403h5">> <<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/li<wbr>stinfo/erlang-questions</a>><br>
><br>
><br>
><br>
><br>
> --<br>
> PGP fingerprint: F708 E141 AE8D 2D38 E1BC DF3D 1719 3EA0 647D 7260<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
><br>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
<br>
<div><span style="font-size:small;background-color:rgb(255,255,255)">ShopGun</span><span style="font-size:small;background-color:rgb(255,255,255)">, your helping hand in shopping, is available at </span><a href="http://shopgun.com" style="font-size:small;background-color:white" target="_blank">shopgun.com</a><span style="font-size:small;background-color:white"> and as the </span><a href="http://shopgun.com/app/download/" style="font-size:small;background-color:white" target="_blank">ShopGun app</a><font size="2"><span style="background-color:rgb(255,255,255)">.</span></font></div><div style="font-size:1.3em"><span style="background-color:white"><font size="2"><br></font></span></div><div style="font-size:1.3em"><span style="background-color:white"><font color="#808080" size="2">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>