Merge "Improve debug logging level in Engine"

This commit is contained in:
Jenkins 2016-10-26 20:19:24 +00:00 committed by Gerrit Code Review
commit a11ddfa11b
1 changed files with 4 additions and 2 deletions

View File

@ -317,9 +317,10 @@ class TaskEngine(object):
self._validate_config_syntax(self.config)
self._validate_config_semantic(self.config)
except Exception as e:
exception_info = json.dumps(traceback.format_exc(), indent=2)
self.task.set_failed(type(e).__name__,
str(e),
json.dumps(traceback.format_exc()))
str(e), exception_info)
LOG.debug(exception_info)
raise exceptions.InvalidTaskException(str(e))
def _get_runner(self, config):
@ -377,6 +378,7 @@ class TaskEngine(object):
runner_obj.run(workload.name, context_obj,
workload.args)
except Exception as e:
LOG.debug(traceback.format_exc())
LOG.exception(e)
if objects.Task.get_status(