@@ -194,6 +194,7 @@ Usage of oauth2_proxy:
194 -redeem-url string: Token redemption endpoint
194 -redeem-url string: Token redemption endpoint
195 -redirect-url string: the OAuth Redirect URL. ie: "https://internalapp.yourcompany.com/oauth2/callback"
195 -redirect-url string: the OAuth Redirect URL. ie: "https://internalapp.yourcompany.com/oauth2/callback"
196 -request-logging: Log requests to stdout (default true)
196 -request-logging: Log requests to stdout (default true)
197+ -request-logging-format: Template for request log lines (see "Logging Format" paragraph below)
197 -resource string: The resource that is protected (Azure AD only)
198 -resource string: The resource that is protected (Azure AD only)
198 -scope string: OAuth scope specification
199 -scope string: OAuth scope specification
199 -set-xauthrequest: set X-Auth-Request-User and X-Auth-Request-Email response headers (useful in Nginx auth_request mode)
200 -set-xauthrequest: set X-Auth-Request-User and X-Auth-Request-Email response headers (useful in Nginx auth_request mode)
@@ -331,12 +332,21 @@ following:
332## Logging Format
333## Logging Format
334−OAuth2 Proxy logs requests to stdout in a format similar to Apache Combined Log.
335+By default, OAuth2 Proxy logs requests to stdout in a format similar to Apache Combined Log.
337<REMOTE_ADDRESS> - <user@domain.com> [19/Mar/2015:17:20:19 -0400] <HOST_HEADER> GET <UPSTREAM_HOST> "/path/" HTTP/1.1 "<USER_AGENT>" <RESPONSE_CODE> <RESPONSE_BYTES> <REQUEST_DURATION>
338<REMOTE_ADDRESS> - <user@domain.com> [19/Mar/2015:17:20:19 -0400] <HOST_HEADER> GET <UPSTREAM_HOST> "/path/" HTTP/1.1 "<USER_AGENT>" <RESPONSE_CODE> <RESPONSE_BYTES> <REQUEST_DURATION>
341+If you require a different format than that, you can configure it with the `-request-logging-format` flag.
342+The default format is configured as follows:
345+{{.Client}} - {{.Username}} [{{.Timestamp}}] {{.Host}} {{.RequestMethod}} {{.Upstream}} {{.RequestURI}} {{.Protocol}} {{.UserAgent}} {{.StatusCode}} {{.ResponseSize}} {{.RequestDuration}}
348+[See `logMessageData` in `logging_handler.go`](./logging_handler.go) for all available variables.
340## Adding a new Provider
350## Adding a new Provider
342Follow the examples in the [`providers` package](providers/) to define a new
352Follow the examples in the [`providers` package](providers/) to define a new