You can use LOG.exception. Regards, Wanghua On Wed, Feb 3, 2016 at 2:28 PM, Khayam Gondal <khayam.gondal at gmail.com> wrote: > Is there a way to do logging the information and traceback at the same > time. Currently I am doing it like this. > > > > > > LOG.error(_LE('Record already exists: %(exception)s ' > > '\n %(traceback)'), > > {'exception': e1}, > > {'traceback': traceback.print_stack()}). > > > > Let me know if this is correct way? > > Regards > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160203/1fc4a0e8/attachment.html>