diff options
author | Bin Yang <bin.yang@windriver.com> | 2017-03-27 13:53:37 +0800 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2017-03-27 13:53:37 +0800 |
commit | 1dabab968a9350d73a7b3bd98a2a2bbb45081fc8 (patch) | |
tree | 824f2c06a44c4b3605bf7aa69effa685ad08ad48 /newton/newton/requests/views/hosts.py | |
parent | 74eb31dfb5228843c894a119d4d4235a278a89ee (diff) |
Add traceback to all APIs
fix a bug in vport API as well.
Change-Id: I2e4db0b1576a3208285df59db8a238315dd48f91
Issue-Id: MULTIVIM-55
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton/newton/requests/views/hosts.py')
-rw-r--r-- | newton/newton/requests/views/hosts.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/newton/newton/requests/views/hosts.py b/newton/newton/requests/views/hosts.py index f0ea6862..7801c557 100644 --- a/newton/newton/requests/views/hosts.py +++ b/newton/newton/requests/views/hosts.py @@ -13,6 +13,7 @@ # limitations under the License. import logging import json +import traceback from rest_framework import status from rest_framework.response import Response @@ -76,6 +77,7 @@ class Hosts(APIView): except VimDriverNewtonException as e: return Response(data={'error': e.content}, status=e.status_code) except Exception as e: + logger.error(traceback.format_exc()) return Response(data={'error': str(e)}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) |