release log gate if disable-gated-logs flag is set (#24280)

* release log gate if disable-gated-logs flag is set

* CL

* Update changelog/24280.txt

Co-authored-by: Josh Black <raskchanky@gmail.com>

---------

Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
Co-authored-by: Josh Black <raskchanky@gmail.com>
This commit is contained in:
Hamid Ghaf
2023-12-11 08:08:48 -08:00
committed by GitHub
parent 28ce9c5a4c
commit 57b6b74283
6 changed files with 28 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import (
// logFlags are the 'log' related flags that can be shared across commands.
type logFlags struct {
flagCombineLogs bool
flagDisableGatedLogs bool
flagLogLevel string
flagLogFormat string
flagLogFile string
@@ -41,6 +42,13 @@ func (f *FlagSet) addLogFlags(l *logFlags) {
Hidden: true,
})
f.BoolVar(&BoolVar{
Name: flagDisableGatedLogs,
Target: &l.flagDisableGatedLogs,
Default: false,
Hidden: true,
})
f.StringVar(&StringVar{
Name: flagNameLogLevel,
Target: &l.flagLogLevel,