From f9241e0e94b1094b12fc58ad212cdf02d021b992 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 27 Feb 2023 10:49:59 +0100 Subject: 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. --- src/other_tools/just_mr/cli.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/other_tools/just_mr/cli.hpp') 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 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( -- cgit v1.2.3