PY-19923 Don't log stacktrace of ExecutionException so as not to pollute log files
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Sat, 6 Aug 2016 18:00:20 +0000 (21:00 +0300)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Mon, 8 Aug 2016 12:42:44 +0000 (15:42 +0300)
Unless debug logging for PythonSdkUpdater is enabled.

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) {