def _openstack_logged_method(method_name, original_name):
 def _run_with_logging(self, *args, **kwargs):
  original = getattr(self, original_name)
  method = getattr(original, method_name)
  with OPENSTACK_ACTION(operation=[method_name, args, kwargs]):
   try:
    return method(*args, **kwargs)
   except NovaClientException as e:
    NOVA_CLIENT_EXCEPTION(code=e.code, message=e.message, details=e.details, request_id=e.request_id, url=e.url, method=e.method).write()
    raise
   except KeystoneHttpError as e:
    KEYSTONE_HTTP_ERROR(code=e.http_status, message=e.message, details=e.details, request_id=e.request_id, url=e.url, method=e.method, response=e.response.text).write()
    raise
 return _run_with_logging

def _openstack_logged_method ( method_name , original_name ) : def _run_with_logging ( self , * args , ** kwargs ) : original = getattr ( self , original_name ) method = getattr ( original , method_name ) with OPENSTACK_ACTION ( operation = [ method_name , args , kwargs ] ) : try : return method ( * args , ** kwargs ) except NovaClientException as e : NOVA_CLIENT_EXCEPTION ( code = e . code , message = e . message , details = e . details , request_id = e . request_id , url = e . url , method = e . method ) . write ( ) raise except KeystoneHttpError as e : KEYSTONE_HTTP_ERROR ( code = e . http_status , message = e . message , details = e . details , request_id = e . request_id , url = e . url , method = e . method , response = e . response . text ) . write ( ) raise return _run_with_logging
run a method and log additional information about any exceptions that are raised .