<div dir="ltr">Just taking a quick look it does not appear that lager_console_backend supports that argument style in 3.4.0<div><br></div><div><a href="https://github.com/erlang-lager/lager/blob/3.4.0/src/lager_console_backend.erl">https://github.com/erlang-lager/lager/blob/3.4.0/src/lager_console_backend.erl</a><br></div><div><br></div><div>Try <span style="font-size:12.8px">{lager_console_backend, [info]}</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 7:09 AM, Devangana Tarafdar <span dir="ltr"><<a href="mailto:devangana@gmail.com" target="_blank">devangana@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I am having an issue with lager (3.4.0) and am wondering if anyone can point out if I am doing something wrong:<br></div><div><br></div><div>Basically I want to change the log level for the console backend from the app config file.<br><br></div>I am starting lager with the following inserted in the config file:<br><br>  {lager,[<br>            {error_logger_whitelist,[yaws_<wbr>log_file_h]},<br>            {handlers, [<br>               {lager_file_backend, [{file,"/tmp/<a href="http://lager_test.info" target="_blank">lager_test.info</a>"}<wbr>,{level,debug}]},</div><div>             <br></div><div>                {lager_console_backend, [{level,info}]}<br>           ]},<br><br>            {log_root, "/tmp"}<br><br>          ]},<br><br></div>Is the above syntax for lager_console_backend  correct ?  Lager seems to be having some problem with the console backend handler. I see this in the log file:<br><br><div><br>2017-10-12 15:34:33.405 [error] <0.60.0>@lager_handler_watcher<wbr>:123 Lager fatally failed to install handler lager_console_backend into lager_event, NOT retrying: bad_log_level</div><div><br></div><div>2017-10-12 15:34:33.405 [debug] <0.62.0>@lager_handler_watcher<wbr>:119 Lager installed handler error_logger_lager_h into error_logger<br>2017-10-12 15:34:33.435 [debug] <0.47.0> Supervisor gr_param_sup started gr_param:start_link(gr_lager_d<wbr>efault_tracer_params) at pid <0.64.0><br>2017-10-12 15:34:33.435 [debug] <0.46.0> Supervisor gr_counter_sup started gr_counter:start_link(gr_lager<wbr>_default_tracer_counters) at pid <0.65.0><br>2017-10-12 15:34:33.439 [debug] <0.48.0> Supervisor gr_manager_sup started gr_manager:start_link(gr_lager<wbr>_default_tracer_params_mgr, gr_lager_default_tracer_params<wbr>, []) at pid <0.66.0><br>2017-10-12 15:34:33.439 [debug] <0.48.0> Supervisor gr_manager_sup started gr_manager:start_link(gr_lager<wbr>_default_tracer_counters_mgr, gr_lager_default_tracer_counte<wbr>rs, [{input,0},{filter,0},{output,<wbr>0},{job_input,0},{job_run,0},{<wbr>job_time,0},{job_error,0}]) at pid <0.67.0><br>2017-10-12 15:34:33.633 [info] <0.7.0> Application lager started on node '<a href="mailto:d@atxload01a.com" target="_blank">d@atxload01a.test.com</a>'<br>2017-10-12 15:34:33.888 [debug] <0.56.0>@lager_handler_watcher<wbr>:119 Lager installed handler lager_backend_throttle into lager_event<br><br>I am starting up my tiny test environment as follows:<br><br>[dtaraf@atxload01a lager_test_rel-1.0.0]$ erl -name d -setcookie x -config /usr/pkg/otp/rel/lager_test_re<wbr>l-1.0.0/lager_test_rel.config -pz /usr/pkg/otp/lib/lager-3.4.0/e<wbr>bin -pz /usr/pkg/otp/lib/goldrush-0.1.<wbr>9/ebin</div><div><br></div><div><b>Erlang/OTP 17</b> [erts-6.3] [source] [64-bit] [async-threads:10] [kernel-poll:false]<br><br>Eshell V6.3  (abort with ^G)</div><div><br></div><div>(<a href="mailto:d@atxload01a.test.com" target="_blank">d@atxload01a.test.com</a>)1>  application:start(compiler),ap<wbr>plication:start(syntax_tools),<wbr>application:start(goldrush),ap<wbr>plication:start(lager).<br>ok<br>(<a href="mailto:d@atxload01a.test.com" target="_blank">d@atxload01a.test.com</a>)2>  lager:status().<br>Lager status:<br>File /tmp/<a href="http://lager_test.info" target="_blank">lager_test.info</a> (lager_event) at level debug<br>Console (lager_event) at level {error,bad_module}<br>Active Traces:<br>Tracing Reductions:<br>Tracing Statistics:<br>  input: 0<br> output: 0<br> filter: 0<br>ok<br><br>(<a href="mailto:d@atxload01a.test.com" target="_blank">d@atxload01a.test.com</a>)3> application:which_applications<wbr>().<br>[<b>{lager,"Erlang logging framework","3.4.0</b>"},<br> {goldrush,"Erlang event stream processor","0.1.9"},<br> {syntax_tools,"Syntax tools","1.6.17"},<br> {compiler,"ERTS  CXC 138 10","5.0.3"},<br> {stdlib,"ERTS  CXC 138 10","2.3"},<br> {kernel,"ERTS  CXC 138 10","3.1"}]<br>(<a href="mailto:d@atxload01a.test.com" target="_blank">d@atxload01a.test.com</a>)4> <br><br><br></div><div>Thanks !<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Devangana<br></div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>