From d8c602cdf0c55247170b29a4a10c252b3356c011 Mon Sep 17 00:00:00 2001 From: Andrew Lazarev Date: Fri, 13 Feb 2015 10:35:19 -0800 Subject: [PATCH] Removed error log for failure inside individual thread We don't want to have all errors from all threads logged on ERROR level. E.g. in case of network failure and 10 parallel VM tasks there will be 10 stacktraces in the logs. Parent thread will receive the first exception and in most cases it is enough to treat operation over all threads as errored. Change-Id: Idc93c33f41d502e5aa0149b93ce816379c1043b1 Closes-Bug: #1421032 --- sahara/context.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sahara/context.py b/sahara/context.py index 86d21792..32990d66 100644 --- a/sahara/context.py +++ b/sahara/context.py @@ -24,7 +24,6 @@ from oslo_log import log as logging from sahara import exceptions as ex from sahara.i18n import _ -from sahara.i18n import _LE from sahara.i18n import _LW @@ -189,8 +188,8 @@ def _wrapper(ctx, thread_description, thread_group, func, *args, **kwargs): set_ctx(ctx) func(*args, **kwargs) except BaseException as e: - LOG.exception( - _LE("Thread '%(thread)s' fails with exception: '%(exception)s'"), + LOG.debug( + "Thread '%(thread)s' failed with exception: '%(exception)s'", {'thread': thread_description, 'exception': e}) if thread_group and not thread_group.exc: thread_group.exc = e