[openstack-dev] Logging and traceback at same time.

Khayam Gondal khayam.gondal at gmail.com
Wed Feb 3 06:28:52 UTC 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160203/ac41afe8/attachment.html>


More information about the OpenStack-dev mailing list