<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes, here is the bottom of my sys.config.<div class=""><br class=""></div><div class=""><div style="background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class="">{kernel,</div><div class="">    [{logger_level, info}, {logger,</div><div class="">      [{handler, default, logger_disk_log_h,</div><div class="">       #{config => #{file => "/var/log/asp2aj/erlang.log", type => wrap, max_no_files => 10, max_no_bytes => 1000000000},</div><div class="">         formatter => {logger_formatter, #{single_line => true, template => [time," ",mfa,":",line," ",pid," [",level,"] ",msg,"\n"]}}}</div><div class="">      }]</div><div class="">    }]</div><div class="">  }].</div></div></div><div class=""><br class=""></div><div class="">Mark.</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 25, 2019, at 1:44 PM, Steve Strong <<a href="mailto:steve@srstrong.com" class="">steve@srstrong.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Do you have the logger_level value set in your sys.config (or are you setting it in code)?  The ?LOG macros check that before logging…<div class=""><br class=""></div><div class=""><div class="">-define(DO_LOG(Level,Args),</div><div class="">        case logger:allow(Level,?MODULE) of</div><div class="">            true -></div><div class="">                apply(logger,macro_log,[?LOCATION,Level|Args]);</div><div class="">            false -></div><div class="">                ok</div><div class="">        end).</div><div class="">-endif.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Steve</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 25 Mar 2019, at 19:41, Mark Geib <<a href="mailto:mark.geib.44@gmail.com" class="">mark.geib.44@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am using the default handler and formatter, i.e.: <div class=""><br class=""></div><div class=""><div style="background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class="">[{handler, default, logger_disk_log_h,  % handler, HandlerId, Module,</div><div class="">  #{config => #{file => "/var/log/asp2aj/erlang.log", type => wrap, max_no_files => 10, max_no_bytes => 1000000000},</div><div class="">    formatter => {logger_formatter, #{single_line => true, template => [time," ",mfa,":",line," ",pid," [",level,"] ",msg,"\n"]}}}</div><div class=""> }]</div><div class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">And my logging works fine previously when I was doing logger:info()...</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Mark.</div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Mar 25, 2019, at 1:32 PM, Fred Hebert <<a href="mailto:mononcqc@ferd.ca" class="">mononcqc@ferd.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">See if you are using any log formatters or handlers -- those may not be direct dependencies of your application, and therefore do not get included in the final release. You will need to add these dependencies to the release independently so that they are present to run and handle output.</div><div class=""><br class=""></div><div class="">The rebar3 shell and other interactive modes can dynamically load libraries from disk and won't show that little gotcha at all.<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 25, 2019 at 1:47 PM Mark Geib <<a href="mailto:mark.geib.44@gmail.com" class="">mark.geib.44@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a problem where I see no logger output in a release built with rebar3 using the new ?LOG macros. If I use the logger: functions<br class="">
everything is working fine. Decided to change to use the macros in order to get able to include MFA, line number, etc. in templates.<br class="">
<br class="">
Also, doing a dev release build and then running interactively everything works fine with the ?LOG macros. It’s like the<br class="">
prod builds are missing something compared to dev build.<br class="">
<br class="">
Thanks in advance for any help.<br class="">
<br class="">
Mark.<br class="">
_______________________________________________<br class="">
erlang-questions mailing list<br class="">
<a href="mailto:erlang-questions@erlang.org" target="_blank" class="">erlang-questions@erlang.org</a><br class="">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/listinfo/erlang-questions</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class=""><a href="http://erlang.org/mailman/listinfo/erlang-questions" class="">http://erlang.org/mailman/listinfo/erlang-questions</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>