<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27173"><span id="yui_3_16_0_ym19_1_1505503036050_27174">I tried this, infact the throwaway processes I am spawning are not OTP behaviors but just spawn_linked processes.<br clear="none" id="yui_3_16_0_ym19_1_1505503036050_27175"><br clear="none" id="yui_3_16_0_ym19_1_1505503036050_27176"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27177">1> spawn(fun()-> 1/0 end).</div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27178"><0.63.0></div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27179">2> </div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27180">=ERROR REPORT==== 15-Sep-2017::17:24:08 ===</div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27181">Error in process <0.63.0> with exit value:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27182"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27183">{badarith,[{erlang,'/',[1,0],[]}]}</div><div dir="ltr" id="yui_3_16_0_ym19_1_1505503036050_27184"><br clear="none" id="yui_3_16_0_ym19_1_1505503036050_27185">Regardless I get an error report.</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, September 15, 2017 3:34 PM, Jachym Holecek <freza@circlewave.net> wrote:<br></font></div>  <br><br> <div class="y_msg_container"># Vans S 2017-09-15:<div class="yqt5794653099" id="yqtfd92314"><br clear="none">> I am dealing with crashing processes that tend to spam the error logger.<br clear="none">> <br clear="none">> The crashing processes error reason is being caught and everything is taken care of and <br clear="none">> logged via the trapping_exits, spawn_linker.<br clear="none">> <br clear="none">> Still the crashes spam the error_logger.<br clear="none">> <br clear="none">> I am wondering if there is a way to set specific processes to not send a message upon <br clear="none">> crash to the error_logger?</div><br clear="none"><br clear="none">Sure, just avoid the proc_lib wrapper (and its direct consumers) and use<br clear="none">plain erlang:spawn_link/X and friends directly -- remember, they're part of<br clear="none">the language for a reason and its perfectly alright to be using them, just<br clear="none">be prepared to ocassionaly dig a bit deeper and learn one obscure corner of<br clear="none">OTP or another every once in a while.<br clear="none"><br clear="none">If you wish to use one of the standard OTP behaviours, like gen_server and<br clear="none">such (they're built on top of proc_lib and gen), have a look whether they<br clear="none">provide an 'enter_loop/X' exported function -- that will allow you to still<br clear="none">use the generic logic, but arrange process startup your way, ie. no toplevel<br clear="none">try/catch sending stuff to error_logger. Note that this will not play well<br clear="none">with gen_server's hibernation feature, as return from hibernation will<br clear="none">reinstate proc_lib's toplevel try/catch.<br clear="none"><br clear="none">Of course, you could always write your own custom behaviours doing whatever<br clear="none">it takes to integrate well with the rest of your system -- rarely worth the<br clear="none">trouble, but otherwise a perfectly fine thing to do as well.<br clear="none"><br clear="none">So much for addressing your specific question. Wider point to make is that<br clear="none">various sources of logging in your system operate at different frequencies<br clear="none">and have varying relevance, blindly routing them all into a single sink is<br clear="none">asking for an operational disaster of one sort or another -- and this is a<br clear="none">mistake users unfortunately seem to run into all too easily. Addresing it<br clear="none">properly takes some effort across all components comprising your system,<br clear="none">no silver bullets there.<br clear="none"><br clear="none">HTH,<br clear="none">    -- Jachym<div class="yqt5794653099" id="yqtfd49891"><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>