Skip to content

Commit

Permalink
disable collector api access logs by default
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kruse <[email protected]>
  • Loading branch information
c-kruse committed Nov 13, 2024
1 parent 6bb42ce commit 490977c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/network-console-collector/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
)

type Config struct {
APIListenAddress string
APIDisableAccessLogs bool
APITLS TLSSpec
APIListenAddress string
APIEnableAccessLogs bool
APITLS TLSSpec

EnableConsole bool
ConsoleLocation string
Expand Down
4 changes: 2 additions & 2 deletions cmd/network-console-collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 490977c

Please sign in to comment.