<div dir="ltr">Since logger is so new, I don't know about any real use examples, but since<span style="background-color:rgb(248,249,250);color:rgb(26,26,26);font-family:sans-serif"> chars_limit specifically tries to reduce the number of characters to the given number I'd set it to the actual size (or possibly a bit smaller) that you allow. </span><span style="background-color:rgb(248,249,250);color:rgb(26,26,26);font-family:sans-serif">If the size is absolute, then I'd use max_size in addition to do the hard truncation.</span><div><span style="color:rgb(26,26,26);font-family:sans-serif;font-size:14.4px;background-color:rgb(248,249,250)"><br></span></div><div>If you'd rather use depth, the outcome is a bit harder to predict, but I found this guideline in some old documentation:<div>"<span style="color:rgb(26,26,26);font-family:sans-serif;background-color:rgb(248,249,250)">A reasonable starting value for </span><span class="gmail-code" style="font-family:mono,Courier,monospace;background-color:rgb(243,243,243);color:rgb(26,26,26)">Depth</span><span style="color:rgb(26,26,26);font-family:sans-serif;background-color:rgb(248,249,250)"> is </span><span class="gmail-code" style="font-family:mono,Courier,monospace;background-color:rgb(243,243,243);color:rgb(26,26,26)">30</span><span style="color:rgb(26,26,26);font-family:sans-serif;background-color:rgb(248,249,250)">. We recommend to test crashing various processes in your application, examine the logs from the crashes, and then increase or decrease the value."</span><br></div></div><div><br></div><div><font color="#1a1a1a" face="sans-serif"><span style="font-size:14.4px;background-color:rgb(248,249,250)">/siri</span></font></div><div><span style="color:rgb(26,26,26);font-family:sans-serif;font-size:14.4px;background-color:rgb(248,249,250)"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den tor. 14. mar. 2019 kl. 13:50 skrev Frank Muller <<a href="mailto:frank.muller.erl@gmail.com">frank.muller.erl@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Hi Siri</div></div><div dir="auto"><br></div><div dir="auto">Exactly what I want. Any real example usage with good default settings please?</div><div dir="auto"><br></div><div dir="auto">I want to trim my strings to 1KB.</div><div dir="auto"><br></div><div dir="auto">/Frank</div><div dir="auto"><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Frank,<div><br></div><div>The default formatter, logger_formatter, has three configuration parameters for this purpose: depth, chars_limit, and max_size. depth and chars_limit are soft limits that work on format strings, and max_size is a hard truncation limit. See <a href="http://erlang.org/doc/man/logger_formatter.html" target="_blank">http://erlang.org/doc/man/logger_formatter.html</a> for more details.</div><div><br></div><div>Regards</div><div>/siri</div></div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den tor. 14. mar. 2019 kl. 12:39 skrev Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>>:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi guys</div><div dir="auto"><br></div><div dir="auto">Which config I should use to force Logger trim long lines of logs (ellided [...])?</div><div dir="auto"><br></div><div dir="auto">Thanks in advance </div><div dir="auto">/Frank</div></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_______________________________________________<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/listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>