compilation output to logs
This commit is contained in:
@@ -49,6 +49,7 @@ class SimulationFileController(QObject):
|
||||
except (OSError, RuntimeError, TypeError, ValueError):
|
||||
logger.exception("Could not open simulation %s", file_path)
|
||||
raise
|
||||
self._log_compilation()
|
||||
self._update_window()
|
||||
logger.info("Opened simulation: %s", file_path)
|
||||
|
||||
@@ -151,3 +152,12 @@ class SimulationFileController(QObject):
|
||||
self.window.statusBar().showMessage(f"{self.root.component_path} · {compiled}")
|
||||
self.window.ui.actionSave_Simulation_Run.setEnabled(True)
|
||||
self.window.ui.actionSimulation_Options.setEnabled(True)
|
||||
|
||||
def _log_compilation(self) -> None:
|
||||
if self.compiled_model is None:
|
||||
return
|
||||
logger.info("Compiled model %s: %s", self.compiled_model.model_name, self.compiled_model.executable)
|
||||
if self.compiled_model.output.strip():
|
||||
logger.info("Compiler output:\n%s", self.compiled_model.output.strip())
|
||||
if self.compiled_model.errors.strip():
|
||||
logger.warning("Compiler errors:\n%s", self.compiled_model.errors.strip())
|
||||
|
||||
Reference in New Issue
Block a user