From 0c2f80c405a15d63293ae0b7ae89bdbf9f04e771 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 16 Apr 2024 10:48:00 +0200 Subject: just: support writing the error blobs from serve into a json file ... so that they are available in machine-readable form. In this way, all logs can automatically be collected without the need of parsing human-targeted error messages. --- src/buildtool/common/cli.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/buildtool/common/cli.hpp') diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index cf348bff..1d64fbda 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -69,6 +69,7 @@ struct AnalysisArguments { std::optional expression_root{}; std::optional graph_file{}; std::optional artifacts_to_build_file{}; + std::optional serve_errors_file{}; }; /// \brief Arguments required for describing targets/rules. @@ -330,6 +331,11 @@ static inline auto SetupAnalysisArguments( app->add_option("--expression-file-name", clargs->expression_file_name, "Name of the expressions file."); + app->add_option("--serve-errors-log", + clargs->serve_errors_file, + "File path for dumping the blob identifiers of serve " + "errors as json.") + ->type_name("PATH"); if (with_graph) { app->add_option( "--dump-graph", -- cgit v1.2.3