Island: Use logger.exception()
This commit is contained in:
parent
d922d71081
commit
cfd49db8d2
|
@ -22,7 +22,7 @@ class AgentLogs(AbstractResource):
|
||||||
try:
|
try:
|
||||||
log_contents = self._agent_log_repository.get_agent_log(agent_id)
|
log_contents = self._agent_log_repository.get_agent_log(agent_id)
|
||||||
except UnknownRecordError as err:
|
except UnknownRecordError as err:
|
||||||
logger.error(f"Error occurred while getting agent log: {err}")
|
logger.exception(f"Error occurred while getting agent log: {err}")
|
||||||
return "", HTTPStatus.NOT_FOUND
|
return "", HTTPStatus.NOT_FOUND
|
||||||
|
|
||||||
return log_contents, HTTPStatus.OK
|
return log_contents, HTTPStatus.OK
|
||||||
|
|
Loading…
Reference in New Issue