From 2321e4b76a5499b72ca61fdcafc6f2a4c2ca569a Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Wed, 13 Jan 2021 17:46:26 +0100 Subject: [PATCH] release-20.2: ensure that `cockroach mt start-sql` knows about log flags Since `mt start-sql` already supports `--log-dir` it should support `--log-file-max-size`, `--log-group-max-size` and `--log-file-verbosity`. Note: this change is not needed in the v21.1 branch because it is already covered by the new `--log` flag. Release note: None --- pkg/cli/flags.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/cli/flags.go b/pkg/cli/flags.go index 5c5d0fcf08a3..09c97bedc4f8 100644 --- a/pkg/cli/flags.go +++ b/pkg/cli/flags.go @@ -829,6 +829,15 @@ func init() { stringSliceFlag(f, &serverCfg.SQLConfig.TenantKVAddrs, cliflags.KVAddrs) varFlag(f, &startCtx.logDir, cliflags.LogDir) + varFlag(f, + pflag.PFlagFromGoFlag(flag.Lookup(logflags.LogFilesCombinedMaxSizeName)).Value, + cliflags.LogDirMaxSize) + varFlag(f, + pflag.PFlagFromGoFlag(flag.Lookup(logflags.LogFileMaxSizeName)).Value, + cliflags.LogFileMaxSize) + varFlag(f, + pflag.PFlagFromGoFlag(flag.Lookup(logflags.LogFileVerbosityThresholdName)).Value, + cliflags.LogFileVerbosity) } }