diff --git a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/log/Log.java b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/log/Log.java index 51af596c2b..f6b9f088e8 100644 --- a/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/log/Log.java +++ b/plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/log/Log.java @@ -71,7 +71,7 @@ public static CoreException log(int errorLevel, String message, Throwable e) { id = plugin.getBundle().getSymbolicName(); } - Status s = new Status(errorLevel, id, errorLevel, message, e); + Status s = new Status(errorLevel, id, errorLevel, message, errorLevel >= IStatus.ERROR ? e : null); CoreException coreException = new CoreException(s); Tuple key = new Tuple(errorLevel, message); @@ -90,8 +90,8 @@ public static CoreException log(int errorLevel, String message, Throwable e) { if (SharedCorePlugin.inTestMode()) { if (DEBUG_LEVEL <= errorLevel) { System.err.println(message); - if (e != null) { - e.printStackTrace(); + if (s.getException() != null) { + s.getException().printStackTrace(); } } } else {