You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-17 00:17:40 +02:00
Merge pull request #423 from Jimdo/configure_accesslog_format
Make Request Logging Format Configurable
This commit is contained in:
3
main.go
3
main.go
@ -67,6 +67,7 @@ func main() {
|
||||
flagSet.Bool("cookie-httponly", true, "set HttpOnly cookie flag")
|
||||
|
||||
flagSet.Bool("request-logging", true, "Log requests to stdout")
|
||||
flagSet.String("request-logging-format", defaultRequestLoggingFormat, "Template for log lines")
|
||||
|
||||
flagSet.String("provider", "google", "OAuth provider")
|
||||
flagSet.String("oidc-issuer-url", "", "OpenID Connect issuer URL (ie: https://accounts.google.com)")
|
||||
@ -125,7 +126,7 @@ func main() {
|
||||
}
|
||||
|
||||
s := &Server{
|
||||
Handler: LoggingHandler(os.Stdout, oauthproxy, opts.RequestLogging),
|
||||
Handler: LoggingHandler(os.Stdout, oauthproxy, opts.RequestLogging, opts.RequestLoggingFormat),
|
||||
Opts: opts,
|
||||
}
|
||||
s.ListenAndServe()
|
||||
|
Reference in New Issue
Block a user