<div dir="ltr">You can use LOG.exception.<div><br></div><div>Regards,</div><div>Wanghua </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 3, 2016 at 2:28 PM, Khayam Gondal <span dir="ltr"><<a href="mailto:khayam.gondal@gmail.com" target="_blank">khayam.gondal@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 lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal">Is there a way to do logging the information and traceback at the same time. Currently I am doing it like this.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal"><span style="font-family:"Courier New"">LOG.error(_LE('Record already exists: %(exception)s '</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">                     '\n %(traceback)'),</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">                       {'exception': e1},</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">                       {'traceback': traceback.print_stack()}).</span><u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal">Let me know if this is correct way?<u></u><u></u></p></div><div><p class="MsoNormal">Regards<u></u><u></u></p></div></div></div><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>