From 490977c6d4f4c6d7813ebd8abd7c082cd429868a Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Wed, 13 Nov 2024 14:41:36 -0800 Subject: [PATCH] disable collector api access logs by default Signed-off-by: Christian Kruse --- cmd/network-console-collector/config.go | 6 +++--- cmd/network-console-collector/main.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/network-console-collector/config.go b/cmd/network-console-collector/config.go index 5b30d3d818..476a3e460b 100644 --- a/cmd/network-console-collector/config.go +++ b/cmd/network-console-collector/config.go @@ -12,9 +12,9 @@ import ( ) type Config struct { - APIListenAddress string - APIDisableAccessLogs bool - APITLS TLSSpec + APIListenAddress string + APIEnableAccessLogs bool + APITLS TLSSpec EnableConsole bool ConsoleLocation string diff --git a/cmd/network-console-collector/main.go b/cmd/network-console-collector/main.go index e0e5bf3a9d..dc5c7a1b1c 100755 --- a/cmd/network-console-collector/main.go +++ b/cmd/network-console-collector/main.go @@ -77,7 +77,7 @@ func run(cfg Config) error { apiMux.PathPrefix("/").Handler(handleConsoleAssets(cfg.ConsoleLocation)) } - if !cfg.APIDisableAccessLogs { + if cfg.APIEnableAccessLogs { mux.Use(func(next http.Handler) http.Handler { return handlers.LoggingHandler(os.Stdout, next) }) @@ -182,7 +182,7 @@ func main() { flags.BoolVar(&cfg.RouterTLS.SkipVerify, "router-tls-insecure", false, "Set to skip verification of the router certificate and host name") flags.StringVar(&cfg.APIListenAddress, "listen", ":8080", "The address that the API Server will listen on") - flags.BoolVar(&cfg.APIDisableAccessLogs, "disable-access-logs", false, "Disables access logging for the API Server") + flags.BoolVar(&cfg.APIEnableAccessLogs, "enable-access-logs", false, "Enable access logging for the API Server") flags.StringVar(&cfg.APITLS.Cert, "tls-cert", "", "Path to the API Server certificate file") flags.StringVar(&cfg.APITLS.Key, "tls-key", "", "Path to the API Server certificate key file matching tls-cert")