summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-02-28 13:14:23 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2022-02-28 14:03:23 +0100
commit01a6119ffd561cdec42ffeff827e72e1af1ae1ce (patch)
tree9e29d00749fd9884e683992d0b84071de29625e9 /src/buildtool/execution_engine/executor
parent0c9c464ffeadf4963f4b0ae5c296f727b51db2ff (diff)
downloadjustbuild-01a6119ffd561cdec42ffeff827e72e1af1ae1ce.tar.gz
Executor: Log failing action's command
Diffstat (limited to 'src/buildtool/execution_engine/executor')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp
index 3cba3896..6ed5a55f 100644
--- a/src/buildtool/execution_engine/executor/executor.hpp
+++ b/src/buildtool/execution_engine/executor/executor.hpp
@@ -281,6 +281,7 @@ class ExecutorImpl {
logger.Emit(LogLevel::Error,
"action returned non-zero exit code {}",
response->ExitCode());
+ PrintError(logger, action->Command());
return false;
}
}
@@ -301,6 +302,7 @@ class ExecutorImpl {
}
return message;
});
+ PrintError(logger, action->Command());
return false;
}
@@ -337,6 +339,13 @@ class ExecutorImpl {
});
}
}
+
+ void static PrintError(Logger const& logger,
+ std::vector<std::string> const& command) noexcept {
+ logger.Emit(LogLevel::Error,
+ "Failed to execute command:\n{}",
+ nlohmann::json{command}.dump());
+ }
};
/// \brief Executor for using concrete Execution API.