summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/cli.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-02-27 10:49:59 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-02-27 11:39:45 +0100
commitf9241e0e94b1094b12fc58ad212cdf02d021b992 (patch)
treec21623358167a21872aebed8aa0c23ee155a7410 /src/other_tools/just_mr/cli.hpp
parentbd657023d6da9fbc60b64d4b53db005f347dc874 (diff)
downloadjustbuild-f9241e0e94b1094b12fc58ad212cdf02d021b992.tar.gz
Logging: Add --log-append clarg to just-mr and enable log forwarding to just
When calling just from just-mr, all logging arguments are forwarded as early arguments. If any log files are provided, an unconditional --log-append is also prepended to ensure the contents of the log files are not overwritten.
Diffstat (limited to 'src/other_tools/just_mr/cli.hpp')
-rw-r--r--src/other_tools/just_mr/cli.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp
index 30a9032b..2174c331 100644
--- a/src/other_tools/just_mr/cli.hpp
+++ b/src/other_tools/just_mr/cli.hpp
@@ -48,6 +48,7 @@ struct MultiRepoLogArguments {
std::vector<std::filesystem::path> log_files{};
LogLevel log_limit{kDefaultLogLevel};
bool plain_log{false};
+ bool log_append{false};
};
struct MultiRepoSetupArguments {
@@ -156,6 +157,10 @@ static inline auto SetupMultiRepoLogArguments(
app->add_flag("--plain-log",
clargs->plain_log,
"Do not use ANSI escape sequences to highlight messages.");
+ app->add_flag(
+ "--log-append",
+ clargs->log_append,
+ "Append messages to log file instead of overwriting existing.");
}
static inline void SetupMultiRepoSetupArguments(