<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 9, 2016 at 10:10 AM, Brian Avery <span dir="ltr">&lt;<a href="mailto:avery.brian@gmail.com" target="_blank">avery.brian@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">If you mean something like:<div>







<p><span>        logger.exception(</span><span>&quot;Ed&#39;s message is this err = &#39;%s&#39;&quot;</span><span>%(err),exc_info=err</span><span>)</span></p><p><span>or</span></p><p><span>







</span></p><p><span>        logger.exception(</span><span>&quot;Ed&#39;s message is this err = &#39;%s&#39;&quot;</span><span>%(err),exc_info=err,stack_info=</span><span>True</span><span>) (if we want to see the exception stack search)</span></p><p><span><br></span></p><p><span>Then, i&#39;d agree your way is better/clearer.</span></p></div></div></blockquote></div>That&#39;s the idea, but there are a couple issues with those examples.</div><div class="gmail_extra"><br>exc_info doesn&#39;t accept the exception, it takes a boolean, and using exception() with exc_info is redundant. &#39;exception(foo)&#39; is just shorthand for &#39;error(foo, exc_info=True)&#39;, and I think stack_info may also be unnecessary, as exc_info implies traceback.print_exception(), which prints exception traceback entries already.</div><div class="gmail_extra"><br></div><div class="gmail_extra">But yes, that&#39;s the concept. I think this would be sufficient:</div><div class="gmail_extra"><br></div><div class="gmail_extra">    logger.exception(&#39;<span style="color:rgb(80,0,80);font-size:12.8px">An uncaught exception occurred in runqueue&#39;)</span></div><div class="gmail_extra"><span style="color:rgb(80,0,80);font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="color:rgb(80,0,80);font-size:12.8px">Of course we&#39;d want to generate such an exception to test it.</span></div><div class="gmail_extra">-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>