Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable collector api access logs by default
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kruse <christian@c-kruse.com>
c-kruse committed Dec 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 01854be commit a0c07b0
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/network-observer/config.go
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ import (
)

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

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

0 comments on commit a0c07b0

Please sign in to comment.