git.iko.soy/typeable/oauth2-proxy
on master help sign in
Requested changes
commit40ba5659750ad8924718acd90939704b05becd73 authorMisterWil <wilrader@gmail.com> dateFri 12 Apr 2019, 09:48 (8 years ago) parentd77119b
3 files changed+14−14
CHANGELOG.md+1−1 logging_handler_test.go+1−1 options.go+12−12
CHANGELOG.md+1−1
@@ -1,7 +1,7 @@
11# Vx.x.x (Pre-release)
22
33## Changes since v3.2.0
4−- [#52](https://github.com/pusher/oauth2_proxy/pull/52) Logging Improvements
4+- [#52](https://github.com/pusher/oauth2_proxy/pull/52) Logging Improvements (@MisterWil)
55 - Implement flags to configure file logging
66 - `-logging-filename` Defines the filename to log to
77 - `-logging-max-size` Defines the maximum
logging_handler_test.go+1−1
@@ -19,7 +19,7 @@ func TestLoggingHandler_ServeHTTP(t *testing.T) {
1919 Format,
2020 ExpectedLogMessage string
2121 }{
22− {defaultRequestLoggingFormat, fmt.Sprintf("127.0.0.1 - - [%s] test-server GET - \"/foo/bar\" HTTP/1.1 \"\" 200 4 0", ts.Format("02/Jan/2006:15:04:05 -0700"))},
22+ {logger.DefaultRequestLoggingFormat, fmt.Sprintf("127.0.0.1 - - [%s] test-server GET - \"/foo/bar\" HTTP/1.1 \"\" 200 4 0.000\n", logger.FormatTimestamp(ts))},
2323 {"{{.RequestMethod}}", "GET\n"},
2424 }
2525
options.go+12−12
@@ -87,18 +87,18 @@ type Options struct {
8787 ApprovalPrompt string `flag:"approval-prompt" cfg:"approval_prompt" env:"OAUTH2_PROXY_APPROVAL_PROMPT"`
8888
8989 // Configuration values for logging
90− LoggingFilename string `flag:"logging-filename" cfg:"logging_filename"`
91− LoggingMaxSize int `flag:"logging-max-size" cfg:"logging_max_size"`
92− LoggingMaxAge int `flag:"logging-max-age" cfg:"logging_max_age"`
93− LoggingMaxBackups int `flag:"logging-max-backups" cfg:"logging_max_backups"`
94− LoggingLocalTime bool `flag:"logging-local-time" cfg:"logging_local_time"`
95− LoggingCompress bool `flag:"logging-compress" cfg:"logging_compress"`
96− StandardLogging bool `flag:"standard-logging" cfg:"standard_logging"`
97− StandardLoggingFormat string `flag:"standard-logging-format" cfg:"standard_logging_format"`
98− RequestLogging bool `flag:"request-logging" cfg:"request_logging"`
99− RequestLoggingFormat string `flag:"request-logging-format" cfg:"request_logging_format"`
100− AuthLogging bool `flag:"auth-logging" cfg:"auth_logging"`
101− AuthLoggingFormat string `flag:"auth-logging-format" cfg:"auth_logging_format"`
90+ LoggingFilename string `flag:"logging-filename" cfg:"logging_filename" env:"OAUTH2_LOGGING_FILENAME"`
91+ LoggingMaxSize int `flag:"logging-max-size" cfg:"logging_max_size" env:"OAUTH2_LOGGING_MAX_SIZE"`
92+ LoggingMaxAge int `flag:"logging-max-age" cfg:"logging_max_age" env:"OAUTH2_LOGGING_MAX_AGE"`
93+ LoggingMaxBackups int `flag:"logging-max-backups" cfg:"logging_max_backups" env:"OAUTH2_LOGGING_MAX_BACKUPS"`
94+ LoggingLocalTime bool `flag:"logging-local-time" cfg:"logging_local_time" env:"OAUTH2_LOGGING_LOCAL_TIME"`
95+ LoggingCompress bool `flag:"logging-compress" cfg:"logging_compress" env:"OAUTH2_LOGGING_COMPRESS"`
96+ StandardLogging bool `flag:"standard-logging" cfg:"standard_logging" env:"OAUTH2_STANDARD_LOGGING"`
97+ StandardLoggingFormat string `flag:"standard-logging-format" cfg:"standard_logging_format" env:"OAUTH2_STANDARD_LOGGING_FORMAT"`
98+ RequestLogging bool `flag:"request-logging" cfg:"request_logging" env:"OAUTH2_REQUEST_LOGGING"`
99+ RequestLoggingFormat string `flag:"request-logging-format" cfg:"request_logging_format" env:"OAUTH2_REQUEST_LOGGING_FORMAT"`
100+ AuthLogging bool `flag:"auth-logging" cfg:"auth_logging" env:"OAUTH2_LOGGING_AUTH_LOGGING"`
101+ AuthLoggingFormat string `flag:"auth-logging-format" cfg:"auth_logging_format" env:"OAUTH2_AUTH_LOGGING_FORMAT"`
102102
103103 SignatureKey string `flag:"signature-key" cfg:"signature_key" env:"OAUTH2_PROXY_SIGNATURE_KEY"`
104104 AcrValues string `flag:"acr-values" cfg:"acr_values" env:"OAUTH2_PROXY_ACR_VALUES"`