This will ensure we can see what went wrong in case of error,
and it also gives us the debug log when no error occured.
It's a nicer fix for issue #45
returnCode = self._process.wait()
logThread.join()
+ self._result.addLog("Slicer process returned : %d" % returnCode)
+ try:
+ with open(os.path.join(profile.getBasePath(), 'debug.log'), "w") as f:
+ for line in self._result.getLog():
+ f.write(line + "\n")
+ except:
+ pass
+
if returnCode == 0:
pluginError = pluginInfo.runPostProcessingPlugins(self._result)
if pluginError is not None:
self._result.setFinished(True)
self._callback(1.0)
else:
- # We do not print the slicer log because it can quickly fill up
- # the .xsession-errors file if cura gets launched from the WM on Linux
- #for line in self._result.getLog():
- # print line
self._callback(-1.0)
self._process = None