From dd377a4f0f15de4c03c0bd46b74c502ebbdd49bf Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Fri, 31 Jan 2025 13:55:36 +0100 Subject: [PATCH] print error log on failed simulation --- src/actsim_agent/log_parser.cpp | 4 +++- src/actsim_agent/worker.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/actsim_agent/log_parser.cpp b/src/actsim_agent/log_parser.cpp index 3855958..781cb14 100644 --- a/src/actsim_agent/log_parser.cpp +++ b/src/actsim_agent/log_parser.cpp @@ -71,12 +71,14 @@ void LogParser::parse_error([[maybe_unused]]const std::string& line) { // actsim actually outputs everything on stdout // Only the warnings in the beginning are on stderr. - //this->artifact->add_err_output(line); + this->artifact->add_err_output(line); } void LogParser::finalize() { + this->artifact->clear_logs(); + /* So the only way to do this cleanly is to make sure that either - the model has not sent all tokens yet -> deadlock diff --git a/src/actsim_agent/worker.cpp b/src/actsim_agent/worker.cpp index 95f5a35..6b50eb7 100644 --- a/src/actsim_agent/worker.cpp +++ b/src/actsim_agent/worker.cpp @@ -506,6 +506,9 @@ std::unique_ptr Worker::perform_task(std::unique_ptr& tas if (exit_code != 0) { std::cerr << "SIMULATION EXITED ABNORMALLY!" << std::endl; + for (auto&& line : result->get_content().second) { + std::cerr << line << std::endl; + } } break;