PY-19923 Don't log stacktrace of ExecutionException so as not to pollute log files
[idea/community.git] / python / src / com / jetbrains / python / sdk / PythonSdkUpdater.java
index edca9e70620fb6a96051c859f10787a1c92bd723..c2b8fa6e862711da4c2c7453d862ba598e5ad121 100644 (file)
@@ -166,8 +166,13 @@ public class PythonSdkUpdater implements StartupActivity {
                   PyPackageManager.getInstance(sdk12).refreshAndGetPackages(true);
                 }
                 catch (ExecutionException e) {
-                  e.initCause(methodCallStacktrace);
-                  LOG.warn(e);
+                  if (LOG.isDebugEnabled()) {
+                    e.initCause(methodCallStacktrace);
+                    LOG.debug(e);
+                  }
+                  else {
+                    LOG.warn(e.getMessage());
+                  }
                 }
               }
               catch (InvalidSdkException e) {