From: Vsevolod Stakhov Date: Tue, 29 Jul 2025 09:06:35 +0000 (+0100) Subject: [Minor] Add --log-tag option for rspamc X-Git-Tag: 3.13.0~38^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=533b9f676e2ff23a59cc3a622487c9c1a89bea2c;p=thirdparty%2Frspamd.git [Minor] Add --log-tag option for rspamc --- diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx index 04bbaeac85..1dc48faaec 100644 --- a/src/client/rspamc.cxx +++ b/src/client/rspamc.cxx @@ -92,6 +92,7 @@ static const char *pubkey = nullptr; static const char *user_agent = "rspamc"; static const char *files_list = nullptr; static const char *queue_id = nullptr; +static const char *log_tag = nullptr; static std::string settings; std::vector children; @@ -192,6 +193,8 @@ static GOptionEntry entries[] = "Read one or more newline separated filenames to scan from file", nullptr}, {"queue-id", '\0', 0, G_OPTION_ARG_STRING, &queue_id, "Set Queue-ID header for the request", nullptr}, + {"log-tag", '\0', 0, G_OPTION_ARG_STRING, &log_tag, + "Set Log-Tag header for the request", nullptr}, {"settings", '\0', 0, G_OPTION_ARG_CALLBACK, (void *) &rspamc_settings_callback, "Set Settings header as JSON/UCL for the request", nullptr}, {nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr}}; @@ -945,6 +948,10 @@ add_options(GQueue *opts) add_client_header(opts, "Queue-Id", queue_id); } + if (log_tag != nullptr) { + add_client_header(opts, "Log-Tag", log_tag); + } + if (!settings.empty()) { add_client_header(opts, "Settings", settings.c_str()); }