From e39f12f7403ec345ff7dba55a9b62e7217d25ea4 Mon Sep 17 00:00:00 2001 From: Kevin Kreitner Date: Tue, 19 Jan 2021 17:28:58 +0100 Subject: [PATCH] Add sensible logging flag to default setup for logger --- contrib/oauth2-proxy.cfg.example | 1 + pkg/apis/options/logging.go | 1 + 2 files changed, 2 insertions(+) diff --git a/contrib/oauth2-proxy.cfg.example b/contrib/oauth2-proxy.cfg.example index f003a054..66b705ba 100644 --- a/contrib/oauth2-proxy.cfg.example +++ b/contrib/oauth2-proxy.cfg.example @@ -27,6 +27,7 @@ #logging_max_age = 7 #logging_local_time = true #logging_compress = false +#sensible_logging = false #standard_logging = true #standard_logging_format = "[{{.Timestamp}}] [{{.File}}] {{.Message}}" #request_logging = true diff --git a/pkg/apis/options/logging.go b/pkg/apis/options/logging.go index 1c6f9415..6b3cfba2 100644 --- a/pkg/apis/options/logging.go +++ b/pkg/apis/options/logging.go @@ -34,6 +34,7 @@ func loggingFlagSet() *pflag.FlagSet { flagSet.Bool("auth-logging", true, "Log authentication attempts") flagSet.String("auth-logging-format", logger.DefaultAuthLoggingFormat, "Template for authentication log lines") + flagSet.Bool("sensible-logging", false, "Log sensible data") flagSet.Bool("standard-logging", true, "Log standard runtime information") flagSet.String("standard-logging-format", logger.DefaultStandardLoggingFormat, "Template for standard log lines") flagSet.Bool("request-logging", true, "Log HTTP requests")