Merge "Remove unnecessary ERROR logging"
This commit is contained in:
commit
cd33d18cb9
|
@ -62,7 +62,7 @@ class DatasourceModel(base.APIModel):
|
|||
datasource = self.bus.get_datasource(id_)
|
||||
return datasource
|
||||
except exception.DatasourceNotFound as e:
|
||||
LOG.exception("Datasource '%s' not found", id_)
|
||||
LOG.debug("Datasource '%s' not found", id_)
|
||||
raise webservice.DataModelException(e.code, str(e),
|
||||
http_status_code=e.code)
|
||||
|
||||
|
@ -90,7 +90,7 @@ class DatasourceModel(base.APIModel):
|
|||
exception.DatasourceNameInUse,
|
||||
exception.DriverNotFound,
|
||||
exception.DatasourceCreationError) as e:
|
||||
LOG.exception(_("Datasource creation failed."))
|
||||
LOG.debug(_("Datasource creation failed."))
|
||||
raise webservice.DataModelException(
|
||||
e.code, webservice.original_msg(e), http_status_code=e.code)
|
||||
|
||||
|
@ -126,7 +126,7 @@ class DatasourceModel(base.APIModel):
|
|||
# Note(thread-safety): blocking call
|
||||
self.invoke_rpc(caller, 'request_refresh', args)
|
||||
except exception.CongressException as e:
|
||||
LOG.exception(e)
|
||||
LOG.debug(e)
|
||||
raise webservice.DataModelException.create(e)
|
||||
|
||||
# Note(thread-safety): blocking function
|
||||
|
|
|
@ -89,7 +89,7 @@ class RowModel(base.APIModel):
|
|||
except exception.CongressException as e:
|
||||
m = ("Error occurred while processing source_id '%s' for row "
|
||||
"data of the table '%s'" % (source_id, table_id))
|
||||
LOG.exception(m)
|
||||
LOG.debug(m)
|
||||
raise webservice.DataModelException.create(e)
|
||||
|
||||
if gen_trace and caller is base.ENGINE_SERVICE_ID:
|
||||
|
@ -117,7 +117,7 @@ class RowModel(base.APIModel):
|
|||
LOG.info("replace_items(context=%s)", context)
|
||||
# Note(thread-safety): blocking call
|
||||
caller, source_id = api_utils.get_id_from_context(context)
|
||||
# FIXME(threod-safety): in DSE2, the returned caller can be a
|
||||
# FIXME(thread-safety): in DSE2, the returned caller can be a
|
||||
# datasource name. But the datasource name may now refer to a new,
|
||||
# unrelated datasource. Causing the rest of this code to operate on
|
||||
# an unintended datasource.
|
||||
|
@ -131,9 +131,9 @@ class RowModel(base.APIModel):
|
|||
# Note(thread-safety): blocking call
|
||||
self.invoke_rpc(caller, 'replace_entire_table_data', args)
|
||||
except exception.CongressException as e:
|
||||
LOG.exception("Error occurred while processing updating rows "
|
||||
"for source_id '%s' and table_id '%s'",
|
||||
source_id, table_id)
|
||||
LOG.debug("Error occurred while processing updating rows "
|
||||
"for source_id '%s' and table_id '%s'",
|
||||
source_id, table_id, exc_info=True)
|
||||
raise webservice.DataModelException.create(e)
|
||||
LOG.info("finish replace_items(context=%s)", context)
|
||||
LOG.debug("replaced table %s with row items: %s",
|
||||
|
|
|
@ -54,8 +54,8 @@ class TableModel(base.APIModel):
|
|||
# Note(thread-safety): blocking call
|
||||
tablename = self.invoke_rpc(caller, 'get_tablename', args)
|
||||
except exception.CongressException as e:
|
||||
LOG.exception("Exception occurred while retrieving table %s"
|
||||
"from datasource %s", id_, source_id)
|
||||
LOG.debug("Exception occurred while retrieving table %s"
|
||||
"from datasource %s", id_, source_id)
|
||||
raise webservice.DataModelException.create(e)
|
||||
|
||||
if tablename:
|
||||
|
@ -90,8 +90,8 @@ class TableModel(base.APIModel):
|
|||
tablenames = self.invoke_rpc(caller, 'get_tablenames',
|
||||
{'source_id': source_id})
|
||||
except exception.CongressException as e:
|
||||
LOG.exception("Exception occurred while retrieving tables"
|
||||
"from datasource %s", source_id)
|
||||
LOG.debug("Exception occurred while retrieving tables"
|
||||
"from datasource %s", source_id)
|
||||
raise webservice.DataModelException.create(e)
|
||||
# when the source_id doesn't have any table, 'tablenames' is set([])
|
||||
if isinstance(tablenames, set) or isinstance(tablenames, list):
|
||||
|
|
|
@ -631,7 +631,7 @@ class DataSourceDriver(data_service.DataService):
|
|||
table_state = self.state[table_id]
|
||||
except KeyError:
|
||||
m = ("tablename '%s' does not exist'" % (table_id))
|
||||
LOG.exception(m)
|
||||
LOG.debug(m)
|
||||
raise exception.NotFound(m)
|
||||
|
||||
for tup in table_state:
|
||||
|
|
|
@ -72,7 +72,8 @@ class DSManagerService(data_service.DataService):
|
|||
except db_exc.DBDuplicateEntry:
|
||||
raise exception.DatasourceNameInUse(value=req['name'])
|
||||
except db_exc.DBError:
|
||||
LOG.exception('Creating a new datasource failed.')
|
||||
LOG.exception('Creating a new datasource failed due to '
|
||||
'database backend error.')
|
||||
raise exception.DatasourceCreationError(value=req['name'])
|
||||
|
||||
new_id = datasource['id']
|
||||
|
@ -85,8 +86,8 @@ class DSManagerService(data_service.DataService):
|
|||
engine.synchronizer.sync_one_policy(req['name'])
|
||||
# TODO(dse2): also broadcast to all PE nodes to synch
|
||||
except exception.DataServiceError:
|
||||
LOG.exception('the datasource service is already '
|
||||
'created in the node')
|
||||
LOG.debug('the datasource service is already '
|
||||
'created in the node')
|
||||
except Exception:
|
||||
LOG.exception(
|
||||
'Unexpected exception encountered while registering '
|
||||
|
|
|
@ -128,7 +128,8 @@ class LibraryService (data_service.DataService):
|
|||
policy = db_library_policies.add_policy(policy_dict=policy_dict)
|
||||
return policy.to_dict()
|
||||
except db_exc.DBError:
|
||||
LOG.exception('Creating a new library policy failed.')
|
||||
LOG.exception('Creating a new library policy failed due to '
|
||||
'backend database error.')
|
||||
raise
|
||||
|
||||
def get_policies(self, include_rules=True):
|
||||
|
|
|
@ -298,7 +298,8 @@ class Runtime (object):
|
|||
raise
|
||||
except Exception:
|
||||
policy_name = policy_obj.name
|
||||
msg = "Error thrown while adding policy %s into DB." % policy_name
|
||||
msg = ("Unexpected error while adding policy %s into DB."
|
||||
% policy_name)
|
||||
LOG.exception(msg)
|
||||
raise exception.PolicyException(msg)
|
||||
if db_session:
|
||||
|
@ -793,7 +794,7 @@ class Runtime (object):
|
|||
|
||||
except KeyError:
|
||||
msg = ("policy with name or id '%s' doesn't exist" % source_id)
|
||||
LOG.exception(msg)
|
||||
LOG.debug(msg)
|
||||
raise exception.NotFound(msg)
|
||||
|
||||
return self._create_status_dict(target, keys)
|
||||
|
|
Loading…
Reference in New Issue