@@ -9,7 +9,6 @@ import (
9 oidc "github.com/coreos/go-oidc"
9 oidc "github.com/coreos/go-oidc"
10 ipapi "github.com/oauth2-proxy/oauth2-proxy/pkg/apis/ip"
10 ipapi "github.com/oauth2-proxy/oauth2-proxy/pkg/apis/ip"
11 sessionsapi "github.com/oauth2-proxy/oauth2-proxy/pkg/apis/sessions"
11 sessionsapi "github.com/oauth2-proxy/oauth2-proxy/pkg/apis/sessions"
12− "github.com/oauth2-proxy/oauth2-proxy/pkg/logger"
13 "github.com/oauth2-proxy/oauth2-proxy/providers"
12 "github.com/oauth2-proxy/oauth2-proxy/providers"
14 "github.com/spf13/pflag"
13 "github.com/spf13/pflag"
@@ -183,24 +182,7 @@ func NewOptions() *Options {
183 UserIDClaim: "email",
182 UserIDClaim: "email",
184 InsecureOIDCAllowUnverifiedEmail: false,
183 InsecureOIDCAllowUnverifiedEmail: false,
185 SkipOIDCDiscovery: false,
184 SkipOIDCDiscovery: false,
186− Logging: Logging{
185+ Logging: loggingDefaults(),
191− AuthFormat: logger.DefaultAuthLoggingFormat,
192− RequestEnabled: true,
193− RequestFormat: logger.DefaultRequestLoggingFormat,
194− StandardEnabled: true,
195− StandardFormat: logger.DefaultStandardLoggingFormat,
196− File: LogFileOptions{
@@ -283,24 +265,6 @@ func NewFlagSet() *pflag.FlagSet {
283 flagSet.Bool("redis-use-cluster", false, "Connect to redis cluster. Must set --redis-cluster-connection-urls to use this feature")
265 flagSet.Bool("redis-use-cluster", false, "Connect to redis cluster. Must set --redis-cluster-connection-urls to use this feature")
284 flagSet.StringSlice("redis-cluster-connection-urls", []string{}, "List of Redis cluster connection URLs (eg redis://HOST[:PORT]). Used in conjunction with --redis-use-cluster")
266 flagSet.StringSlice("redis-cluster-connection-urls", []string{}, "List of Redis cluster connection URLs (eg redis://HOST[:PORT]). Used in conjunction with --redis-use-cluster")
286− flagSet.String("logging-filename", "", "File to log requests to, empty for stdout")
287− flagSet.Int("logging-max-size", 100, "Maximum size in megabytes of the log file before rotation")
288− flagSet.Int("logging-max-age", 7, "Maximum number of days to retain old log files")
289− flagSet.Int("logging-max-backups", 0, "Maximum number of old log files to retain; 0 to disable")
290− flagSet.Bool("logging-local-time", true, "If the time in log files and backup filenames are local or UTC time")
291− flagSet.Bool("logging-compress", false, "Should rotated log files be compressed using gzip")
293− flagSet.Bool("standard-logging", true, "Log standard runtime information")
294− flagSet.String("standard-logging-format", logger.DefaultStandardLoggingFormat, "Template for standard log lines")
296− flagSet.Bool("request-logging", true, "Log HTTP requests")
297− flagSet.String("request-logging-format", logger.DefaultRequestLoggingFormat, "Template for HTTP request log lines")
298− flagSet.String("exclude-logging-paths", "", "Exclude logging requests to paths (eg: '/path1,/path2,/path3')")
299− flagSet.Bool("silence-ping-logging", false, "Disable logging of requests to ping endpoint")
301− flagSet.Bool("auth-logging", true, "Log authentication attempts")
302− flagSet.String("auth-logging-format", logger.DefaultAuthLoggingFormat, "Template for authentication log lines")
304 flagSet.String("provider", "google", "OAuth provider")
268 flagSet.String("provider", "google", "OAuth provider")
305 flagSet.String("provider-display-name", "", "Provider display name")
269 flagSet.String("provider-display-name", "", "Provider display name")
306 flagSet.String("oidc-issuer-url", "", "OpenID Connect issuer URL (ie: https://accounts.google.com)")
270 flagSet.String("oidc-issuer-url", "", "OpenID Connect issuer URL (ie: https://accounts.google.com)")
@@ -326,5 +290,7 @@ func NewFlagSet() *pflag.FlagSet {
327 flagSet.String("user-id-claim", "email", "which claim contains the user ID")
291 flagSet.String("user-id-claim", "email", "which claim contains the user ID")
293+ flagSet.AddFlagSet(loggingFlagSet())
329 return flagSet
295 return flagSet